This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -O1 -Winline
- From: Mathieu Malaterre <mmalater at nycap dot rr dot com>
- To: James E Wilson <wilson at specifixinc dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 15 Sep 2004 20:23:54 -0400
- Subject: Re: -O1 -Winline
- References: <4147A8C4.3090104@nycap.rr.com> <4148D923.6050409@specifixinc.com>
- Reply-to: mathieu at malaterre dot com
James E Wilson wrote:
Mathieu Malaterre wrote:
I was playing with gcc flags to test if my code was robust. And I
try -Winline, according to the doc I need to use -O1 also. But if I
try to compile anything that use a bit of the stl I get tons of warnings.
I don't hink -Winline does anything useful for C++ code.
-Winline means emit a warning if something was declared with the inline
keyword, but was not inlined by the compiler. For C code, where inline
tends to be used sparingly, and only for functions that are likely to be
inlined, this warning may give you useful info. For C++ code, where
inline tends to be used a lot, and some things are implicitly inline,
this warning will just give you a lot of noise.
Ok, interesting. So I guess I'll just discard it. Just for the side
note, it all began with xlC complaining about not able to inline some
stl stuff in our code. then I tried gcc 3.3.* to double check, it gave
me almost the same warnings. And yesterday I also tried 3.4.1, but it
didn't emit even one single warning. Thus I thought there was something
fixed in the 3.4.x branch that was not on 3.3...
Anyway, thanks for answering
Mathieu