[Bug c++/41194] __attribute__ ((__gnu_inline__)) yields undefined reference when compiled with -O0, but not with -O1

jakub at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Aug 31 08:05:00 GMT 2009



------- Comment #2 from jakub at gcc dot gnu dot org  2009-08-31 08:05 -------
That's correct.  In C++ gnu_inline attribute always means the GNU C extern
inline function, i.e. it is inlined if deemed desirable and otherwise you must
provide an external definition of the function.
If you don't do this, don't use gnu_inline attribute...


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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



More information about the Gcc-bugs mailing list