On Tuesday 18 December 2012 00:28:14 David A. Wheeler wrote:
> Jim Meyering said:
> > Did you realize that several GNU projects now enable virtually
> > every gcc warning that is available (even including those that
> > are new in the upcoming gcc-4.8, for folks that use bleeding edge gcc)
> > via gnulib's manywarnings.m4 configure-time tests?
> > 
> > Of course, there is a list of warnings that we do disable,
> > due to their typical lack of utility and the invasiveness
> > of changes required do suppress them.
> 
> Is there any way that the autoconf (or automake) folks could make compiler
> warnings much, much easier to enable?  Preferably enabled by default when
> you start packaging something? For example, could gnulib warnings and
> manywarnings be distributed and enabled as *part* of autoconf? If not,
> could autoconf at least strongly advertize the existence of these, and
> include specific instructions to people on how to quickly install it? The
> autoconf section on "gnulib" never even *MENTIONS* the "warnings" and
> "manywarnings" stuff!  And while automake has warnings, they are for the
> automake configuration file... not for compilation.
> 
> Compiler warning flags cost nearly nothing to turn on when you're
> *starting* a project, but they're harder to enable later (a thousand
> warnings about the same thing later is harder than fixing it the first
> time). And while some warnings are nonsense, their use can make the
> resulting software much, much better. If we got people to turn on warning
> flags all over the place, during development, a lot of bugs would simply
> disappear.

you might want to look at the autoconf-archive project:
http://www.gnu.org/software/autoconf-archive/

they provide AX_CFLAGS_WARN_ALL for starters, and then for more refined -W 
flags, you can easily use AX_CHECK_COMPILE_FLAG.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Autoconf mailing list
Autoconf@gnu.org
https://lists.gnu.org/mailman/listinfo/autoconf

Reply via email to