[Bug c/28120] The option -f[no-]inline-functions is invalid with -O2
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Jun 23 10:32:00 GMT 2006
------- Comment #7 from rguenth at gcc dot gnu dot org 2006-06-23 10:06 -------
Newer gcc always inline _static_ functions that are used _once_ into their only
caller (regardless of being declared inline or not). You can disable this
behavior with -fno-inline-functions-called-once.
All gcc inline small functions regardless of beind declared inline or not, if
-finline-functions is in effect (which it is automatically at -O3).
But... why do you care? The "inline" keyword is only a hint to the compiler,
not
something it has to obey to (or obey to the reverse case, where "inline" is not
specified). So yes, you cannot control what is inlined or what not. If you
need to for correctness, there's two function attributes,
__attribute__((noinline)) and __attribute__((always_inline)).
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28120
More information about the Gcc-bugs
mailing list