This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: streambuf.h:403: parse error before `ios'
- From: llewelly at xmission dot com
- To: Boyan Biandov <bbiandov at SEIU790 dot org>
- Cc: "'gcc-help at gcc dot gnu dot org'" <gcc-help at gcc dot gnu dot org>
- Date: 03 May 2004 10:16:56 -0600
- Subject: Re: streambuf.h:403: parse error before `ios'
- References: <970544669F9C4844B487DC8CEBCF933AF51D42@OAKMSEXCH>
Boyan Biandov <bbiandov@SEIU790.org> writes:
> Excellent, this will explain the behavior. What is the default assumption
> meaning what file extension would each compiler assume and also how would
> one force the compiler to ignore the extension as a language descriptor and
> interpret it as specified by the user (may be a command line parameter here)
[snip]
g++ always ignores file name extensions, and assumes C++ .
gcc assumes .c is C, .cc, .cpp, .cxx, and .C are C++ . But gcc doesn't
link in the standard C++ library, or C++ runtime, so it doesn't
work for C++
The -x flag (see http://xrl.us/byzf) can be used to specify the
langauge, overriding the above behaviors for *compilation*, but it
doesn't change the linking behaviors.
Just use 'gcc' for C, and 'g++' for C++ .