[Bug c/55830] inline and __attribute__((always_inline)) treated differently for unused-function warning

colanderman at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Feb 28 18:19:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55830

Chris King <colanderman at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |colanderman at gmail dot
                   |                            |com

--- Comment #5 from Chris King <colanderman at gmail dot com> 2013-02-28 18:18:37 UTC ---
This is good.  I like that I can specify __attribute__ ((always_inline)) on
local static functions and still be warned if they are unused.  IMHO the real
bug is that such usage triggers a "warning: always_inline function might not be
inlinable".

If this bug and/or the above warning behavior is valid, then what's the
"correct" way to say "I want my local static function to be always inlined, but
don't hide warnings if it's unused"?



More information about the Gcc-bugs mailing list