This is the mail archive of the gcc@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]

Re: kernel-2.2.1-undefined references.



> > Remember, we are not talking about ISO C++ here.  We are talking about
> > *C*, and specifically the GNU "extern inline" extension.  So the M to R
> > is the gcc manual.
> 
> I actually did, and while the discussion of "extern inline" strongly
> implies that it is guaranteed behavior, it doesn't *really* come out
> and say it.  There is a hedge above though in the sentence "Note that
> certain usages in a function definition can make it unsuitable for
> inline substitution."  It looks like that is just a hedge on automatic
> inlining, but it is really a hedge on the whole process...

Yes, clearly some functions cannot be inlined.  The compiler developers
cannot promise the impossible.

The language implies that if inlining fails you'd just have an external
reference, meaning you'd have an undefined symbol if there is not a
second, non-inline definition.

> I do think that the language is ambiguous and definitely suggests
> something that the compiler cannot guarantee.  That's why I've
> submitted a patch to egcs-patches to clarify this:
> 
> 	  http://egcs.cygnus.com/ml/egcs-patches/1999-02/msg00176.html

It might be appropriate to generate an error, not a warning, if
"extern inline" fails to inline, since it is clear from the documentation
that this is not a mere hint.



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