Tail recursion vs exceptions vs C++

Iain McClatchie iain-5@truecircuits.com
Tue Oct 28 00:01:00 GMT 2003


Gaby> This is not a valid C++ program: You cannot call main, not take its
Gaby> address -- a difference from C.

My mistake, sorry about that.  The following fails in the same way:

int foo() { foo(); }
int main() { foo(); }

But Zack already pointed out the problem: the GCC driver can determine
whether to run the C or C++ compiler from the file names compiled, but
must be told explicitly whether to link against the C++ library,
regardless.

-Iain



More information about the Gcc mailing list