[Top][All Lists]

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

Re: -Winline generates warnings against gnulib code

From: Reuben Thomas
Subject: Re: -Winline generates warnings against gnulib code
Date: Mon, 9 Jul 2012 22:54:01 +0100

On 9 July 2012 16:03, Bruno Haible <address@hidden> wrote:
> Reuben Thomas wrote:
>> Compiling with -Winline, I get warnings like this:
>> src/main.c: In function 'main':
>> ./lib/gl_xlist.h:124:1: warning: inlining failed in call to
>> 'gl_list_add_last_inline': call is unlikely and code size would grow
> Formally, this looks like a warning. Semantically, it is merely an
> informative diagnostic of the compiler. You are asking the compiler
> "tell me about all your decisions whether to inline calls or not",
> and the compiler tells you.
> IMO, this diagnostic is worth turning on once a year only, and keep it off
> most of the time.

So should -Winline be removed from the standard set for the
manywarnings module? I use manywarnings all the time, as I find it
extremely useful.

Still, this seems to be a separate issue from -Winline applying to
gnulib files. gnulib files are effectively system files, and should be
treated as such. I've used Emacs's way of doing this manually, but,
especially since gnulib replaces some system headers, it seems to me
that it should enable this treatment automatically. Emacs's method is
also a little bit faulty, since it only treats the extra headers you
mention as system headers if you compile with --enable-gcc-warnings
(because it uses this test to avoid a separate test to detect GCC),
which is a bit lazy.


reply via email to

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