This is the mail archive of the gcc-help@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: streambuf.h:403: parse error before `ios'


I believe that "-x c++" will tell the compiler to interpret the source
file as C++ source code.  You can look up the option to see what else it
supports.  I believe that *.c files are interpreted as C source files
while *.cpp, *.cc, *.C, *.cxx and maybe *.c++ are all assumed to be C++
source files.  It is probably bad practice to put C++ code in *.c files.
Also, when linking C++ programs and libraries, you really should use g++
instead of gcc, regardless of how you've named your files.

Cheers,
Lyle

-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of Boyan Biandov
Sent: Sunday, May 02, 2004 10:30 PM
To: 'llewelly@xmission.com'
Cc: 'gcc-help@gcc.gnu.org'
Subject: RE: streambuf.h:403: parse error before `ios'

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)

thanks


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