[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Enabling compiler warning flags
From: |
Mike Frysinger |
Subject: |
Re: Enabling compiler warning flags |
Date: |
Tue, 18 Dec 2012 01:46:47 -0500 |
User-agent: |
KMail/1.13.7 (Linux/3.7.1; KDE/4.6.5; x86_64; ; ) |
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
signature.asc
Description: This is a digitally signed message part.
Re: Enabling compiler warning flags,
Mike Frysinger <=
Re: Enabling compiler warning flags, Bob Friesenhahn, 2012/12/18
Re: Enabling compiler warning flags, Jeffrey Walton, 2012/12/20
Re: Enabling compiler warning flags, Russ Allbery, 2012/12/20