Example program takes 2000 times as long to compile under C++ as C

Richard Henderson rth@cygnus.com
Tue Sep 5 23:20:00 GMT 2000


On Tue, Sep 05, 2000 at 10:46:16PM -0700, Zack Weinberg wrote:
> Hypothesis: maybe it thinks the recursive call uses the address of an
> object in the current function's stack frame?)

We don't check to see whether a recursive call uses the address of an
object, but rather whether an object has its address taken.  I.e. we
do not do the data flow analysis to see where that address wound up.

Previous versions of gcc made a half-hearted attempt at this, but got
it wrong.  I ripped it all out.  Perhaps one day someone will write the
code to solve the problem correctly.


r~


More information about the Gcc-bugs mailing list