[Bug c/126702] undefined reference to inline function

"sjames at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126702

--- Comment #5 from Sam James <sjames at gcc dot gnu.org> ---
i.e. 'inline' means no out-of-line definition will be emitted. It doesn't mean
the compiler must actually inline it (as there may be another copy). At say,
-O0, no inlining is done, so you're left with an undefined reference.

You can use -fgnu89-inline if you want.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.