[plt-scheme] Problem with mzc

From: Justin Lee (justin_lee at ud.com)
Date: Tue Dec 3 12:23:51 EST 2002

[snip}
The extension doesn't actually have very much to do with it; gcc doesn't
actually pay that much attention to the extension.  In fact, the only
difference that I've ever seen between gcc and g++ is that g++
automatically links in the C++ support libraries (libstdc++ and libgcc).
Both front-ends are, IIRC, perfectly capable of handling C++ source
code.
[snip]

Yes, it is the case, both in 2.9x and 3.x, that gcc and g++ are capable of handling c++ code, and that the only difference is that g++ automatically links to stdc++.  This is one reason why gcc now officially stands for "GNU Compiler Collection" instead of "GNU C Compiler".  Though it is not true that the extensions don't matter.  If the extension is .c then gcc will assume c-language mode, if it is .cpp or .cxx, then gcc will assume c++-language mode.  You can override the suffix by using -xc or -xc++.  The language mode does make a *lot* of difference.  Try declaring a variable named 'new' in C vs C++.

I know this is a bit off topic, but perhaps it will be of use to people who spend more time in scheme than c (lucky dogs).

--Justin Lee


Posted on the users mailing list.