This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/49653] Undefined reference to inlined function with -O0,-std=c99


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

Johannes Schaub <schaub.johannes at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schaub.johannes at
                   |                            |googlemail dot com

--- Comment #2 from Johannes Schaub <schaub.johannes at googlemail dot com> 2011-07-06 05:27:41 UTC ---
(In reply to comment #1)
> This is correct for C99.  inline alone in C99 is the same GNU's C90's extern
> inline.

For an explanation, see
http://stackoverflow.com/questions/2217628/multiple-definition-of-inline-functions-when-linking-static-libs/2218034#2218034
. In particular

  "In a call to an inline function it's unspecified whether the external or the
inline definition is used."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]