RFC: should we use -Werror? (& sample patch to do it)

lucier@math.purdue.edu lucier@math.purdue.edu
Wed Sep 5 20:36:00 GMT 2001


Zack Weinberg wrote:

> The reason I'm not convinced that -Werror would be a good idea even
> after we get to zero warnings, is that the existing set of warnings
> have been around for a very long time because they're both harmless
> and intractable.  (Harmless, in the sense that I am fairly sure the
> code is in all cases correct, just pulling dubious tricks.)

I don't think this is true, see, e.g., today's warning on sparc-sun-solaris28:

../../gcc/cp/class.c:6770: warning: int format, different type arg (arg 3)

These types of problems (e.g., printing a HOST_WIDE_INT as an int) are added
all the time, quite often in debug code, and I don't think the code is correct.

Brad Lucier



More information about the Gcc mailing list