My mistake... apparently gcc does compile C++ code, but only if the source is tagged with a .cpp extension. [which, in my own, humble opinion, is a bad idea. Never tie file names with a program/behavior.]
Old comment:
To be anal about it, gcc is only a C compiler. g++ is the C++ compiler for linux/Unix environments. Typically, gcc ignores those errors where in a C program people use C++ syntax and whatnot, but if you want to write ANSI standard code, you should use gcc for C code and g++ for C++ code. (use the -Wall and -pedantic flags if you want strict ANSI code.)
Last edited by krupa; 11-08-2004 at 01:59 AM.
|