This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug c++/11131] Unrelated declaration removes inline flag from function


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11131



------- Additional Comments From bangerth@ices.utexas.edu  2003-06-09 20:20 -------
Subject: Re:  Unrelated declaration removes inline flag from
 function


Nathan, I'm deeply indebted to you for the quick analysis -- if I can make 
it to the next gcc summit and you should be there too, you're sure to have 
a free beer one night!


> To fix this bug requires instantiating at all call sites. We tried not
> to do that as 'maintaining a stack of active functions is expensive'
> (decl2.c:mark_used).

Let me try to see whether I understand you correctly: if the function has 
no throw specification, we have to look it up by instantiating the 
function. OTOH, if it has, the logic is that we can save this work because 
the programmer has already told the compiler.

What I don't understand is the thing about "expensive" -- if I understand 
things right, then we're only taking a short-cut, but if we would 
instantiate the function we would only use as much memory as if the 
programmer had not given a throw specification, right? I don't think that 
would qualify as "expensive", it is at most "just as expensive".

Or am I missing something?

Thanks
  W.

-------------------------------------------------------------------------
Wolfgang Bangerth              email:            bangerth@ices.utexas.edu
                               www: http://www.ices.utexas.edu/~bangerth/


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