This is the mail archive of the gcc-patches@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: inline functions and local labels


    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!


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