This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/49653] Undefined reference to inlined function with -O0,-std=c99
- From: "schaub.johannes at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 6 Jul 2011 05:28:02 +0000
- Subject: [Bug c/49653] Undefined reference to inlined function with -O0,-std=c99
- Auto-submitted: auto-generated
- References: <bug-49653-4@http.gcc.gnu.org/bugzilla/>
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."