H
Hans Vlems
Some of our C programs are compiled and run on different platforms.
Waht I'd like is advice which -W flag(s) would be the best across
platforms (gcc 4.6.2 for Windows 7 64 bits, Windows XP 32 bits as well
as DEC C on VAX and Alpha VMS platforms).
At the moment programs are compiled with:
gcc -pedantic -std=c99 -o <executable> <sourcefile>
However this results in warnings and / or errors on 32 bit Windows 7
that are not seen on XP (32 bit) or vice versa.
Example : printf("%s%c\n","Hello"); does not generate an error (which
it should have done). gcc -Wall -std=c99 does trap this one.
So -Wall checks more strictly than -pedantic?
Hans
Waht I'd like is advice which -W flag(s) would be the best across
platforms (gcc 4.6.2 for Windows 7 64 bits, Windows XP 32 bits as well
as DEC C on VAX and Alpha VMS platforms).
At the moment programs are compiled with:
gcc -pedantic -std=c99 -o <executable> <sourcefile>
However this results in warnings and / or errors on 32 bit Windows 7
that are not seen on XP (32 bit) or vice versa.
Example : printf("%s%c\n","Hello"); does not generate an error (which
it should have done). gcc -Wall -std=c99 does trap this one.
So -Wall checks more strictly than -pedantic?
Hans