bug-gnulib
[Top][All Lists]
Advanced

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

Re: another manywarnings failure


From: Jim Meyering
Subject: Re: another manywarnings failure
Date: Thu, 06 Sep 2012 08:07:31 +0200

Eric Blake wrote:

> I compiled on FreeBSD 8.2 (gcc 4.2.1), and when I updated to the latest
> gnulib, I started to see the following in config.log when running
> ./configure CFLAGS=-g:
>
> configure:53920: checking whether C compiler handles -Wuninitialized
> configure:53939: gcc -std=gnu99 -c -g -Wuninitialized  -D_THREAD_SAFE
> -D_THREAD_SAFE conftest.c >&5
> cc1: warning: -Wuninitialized is not supported without -O
> configure:53939: $? = 0
> configure:53949: result: yes
>
> But when later coupled with -Werror, this makes compilation fail
> noisily.  I think this may have been inadvertently introduced by commit
> dd44da55 when we updated the list of "all" warnings (at least, that was
> the only commit in my recent gnulib update that seems to have touched
> manywarnings).  Any quick ideas how to avoid this warning in the cases
> where it will have no effect other than to cause a warning that trips up
> -Werror?  When checking for warnings, should we also check that each
> warning pairs with -Werror with no further problem?

IME, this is nothing new.  I've had to do this for over a year
with coreutils.  It's an artifact of configuring with one set
of CFLAGS and later compiling with another.

When you configure with one set of warning options and later
build with another, as with your "make CFLAGS=-g", you're
short-circuiting the build tests.  When I do that, I
simply turn off -Werror and ignore the warnings:

    make CFLAGS=-g WERROR_CFLAGS=

Of course, you could simply rerun configure with CFLAGS=-g,
and it would test each -W option individually...  Then you'd
get a warning-free run with -Werror *and* -g.  It's just that
that takes longer than most of us are willing to wait for a
simple recompilation.



reply via email to

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