This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -O1 -Winline
- From: James E Wilson <wilson at specifixinc dot com>
- To: Mathieu Malaterre <mmalater at nycap dot rr dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 15 Sep 2004 17:06:59 -0700
- Subject: Re: -O1 -Winline
- References: <4147A8C4.3090104@nycap.rr.com>
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.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com