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]
Other format: [Raw text]

Re: Tail recursion vs exceptions vs C++


Iain McClatchie <iain@truecircuits.com> writes:

> queue21 (try) [6] % gcc tail.cc
> /tmp/ccgYrf4b.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
> collect2: ld returned 1 exit status

You must either use g++ for the link operation, or add -lstdc++ to the
command line.  (Patches to augment collect2 and/or GNU ld so that this
is not necessary are welcome.)

I very much doubt this has anything to do with recursion, tail or
otherwise, except perhaps insofar as GNU C++ is clever enough to
realize that no exception handling information is necessary for

int main(void) {}

but not

int main(void) { main(); }

zw


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