autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

=?UTF-8?Q?Re:=20Turn=20on=20compiler=20warnings=20by=20default=20for=20A


From: David A. Wheeler
Subject: =?UTF-8?Q?Re:=20Turn=20on=20compiler=20warnings=20by=20default=20for=20AC=5FPROG=5FCC, =20AC=5FPROG=5FCXX=09&=20AC=5FPROG=5FFC?=
Date: Fri, 17 Jan 2014 18:13:31 -0500 (EST)

I said:
> >  It appears to me that the
> > code is just trying to see if "-pedantic" *WORKS*, and if it does,
> > then using that as evidence that "-Wall" would work.

Zack Weinberg said:
> Oh, is that what "-pedantic % -Wall" means?  I had the impression it was 
> going to try each one in isolation and include the subset that worked.

I don't think so, though I'm not the author.  (Dale, confirm?)

> Despite the dire things the GCC manual says about -pedantic, it is not 
> hard to write *new* code that is -pedantic clean, or -Wextra clean, etc; 

I just tried out Dale Visser's patch, and it works very well.
It does *NOT* enable -pedantic in gcc by default, so I don't think
concerns about -pedentic are relevant.

I think the proposed AC_APPEND_FLAG is a reasonable opt-in/opt-out mechanism.


> I would support an opt-in mechanism for enabling a much more aggressive 
> set of warnings, and recommending its use in the manual for new projects.

This proposal does provide an opt-in mechanism for more aggressive warnings,
so I think it meets that.

However, I think it's important to include a number of warnings by *default*,
especially if they're likely to suggest security problems.  As long as they're
just warnings, they will not break the build.  And as long as you CAN easily
disable and control them, they can be disabled.  I think -Wall is a good 
starting
point for that default case (though perhaps some tweaking would be good).

--- David A. Wheeler



reply via email to

[Prev in Thread] Current Thread [Next in Thread]