This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]