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++


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


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