-O1 -Winline

James E Wilson wilson@specifixinc.com
Thu Sep 16 00:23:00 GMT 2004


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



More information about the Gcc mailing list