On Jul 10, 2013, at 12:44 PM, Jeff Law wrote:

> On 07/10/2013 10:29 AM, Jonathan Wakely wrote:
>> On 10 July 2013 17:11, Andi Kleen wrote:
>>> FWIW basically -Werror -Wall defines a compiler version specific
>>> variant of C. May be great for individual developers, but it's always
>>> a serious mistake in any distributed Makefile.
>> 
>> That's a very nice way to put it.
> Yup.  Particularly when one considers that new warnings tend to show up in 
> -Wall from one release to the next.
> 
> I've often suggested that for organizations/projects that are sensitive to 
> additions to -Wall that they use an explicit set of -W options rather than 
> the often changing -Wall.

True.  But even if you do that, you may still get new warnings for new compiler 
releases because of changes/improvements in the checkers.

It seems to me there are two cases.  One is releases, where you want to 
maximize the odds that an install will work.  For that you clearly don't want 
-Werror, and you might want to trim back the warnings.  The other is the 
development phase, where you want to weed out questionable code.  So for 
development builds you want lots of warnings, and possible -Werror as well to 
increase the odds that flagged code will be seen and fixed.

        paul


Reply via email to