This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: inline functions and local labels
- To: davem at dm dot cobaltmicro dot com
- Subject: Re: inline functions and local labels
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Date: Tue, 28 Jul 98 16:35:58 EDT
- Cc: egcs-patches at cygnus dot com, gcc2 at cygnus dot com, rth at cygnus dot com
Then what does "extern inline" say?
"Here's a function that I'd like you to inline if you can. But if you
can't, don't include this copy in the object file since there's a real
one in some other file."
extern __inline__ check_a(int a)
{
__label__ here;
if(my_test(a) != 0)
printf("Assertion on 'a' failed at %p\n", &here);
&&here:
}
Can you tell me that this does not seem like a useful construct or
feature?
It *is* a useful construct and feature. And it would indeed be nice
if we could implement it correctly. But right now we don't. And it's
best to simply not do the inlining and take the efficiency hit than to
implement it incorrectly.
As I said before, I have absolutely no problem with somebody implementing
it properly!