gcc-2.7.2.1

Matthias Andree matthias.andree at gmx.de
Wed Jan 21 18:46:59 CET 2004


Stefan Bellon <sbellon at sbellon.de> writes:

> The C standard says to output a diagnosis. This should be an error and
> no warning. In C++, Stroustrup explicitly states that all four
> assignments above must produce an error.

So use -Werror to upgrade warnings to errors. :->

GCC is not supposed to be a conformance checking tool,
unfortunately. However, I looked through the GCC documentation again, to
find a "-pedantic-errors" option.

I don't have the standard at hand, are there constructs that are
supposed to give warnings rather than errors? Or are all diagnostics
supposed to jam the build?

$ gcc -std=c89 -pedantic-errors -c try.c
try.c: In function `f':
try.c:3: error: pointer targets in initialization differ in signedness
try.c:4: error: pointer targets in initialization differ in signedness
try.c:5: error: pointer targets in initialization differ in signedness
try.c:6: error: pointer targets in assignment differ in signedness

-- 
Matthias Andree

Encrypt your mail: my GnuPG key ID is 0x052E7D95




More information about the Bogofilter mailing list