Problem C++ reserved words

Mihnea Balta dark_lkml@mymail.ro
Tue May 20 13:41:00 GMT 2003


How could it compile those lines? C++ knows that "operator" has a certain 
semantic meaning... it can't act like it doesn't know what "operator" is.

Try compiling C sources with a C compiler, produce object files, and link with 
the C++-compiled code. Or, change your C code (search&replace operator for 
_operator, or something).

On Tuesday 20 May 2003 16:37, Eric.Entressangle@alcatel.fr wrote:
> Hi,
>
> I'm currently trying to compile C code embedded in C++.
> I surrounded the 'include' instructions including C files with Extern "C",
> but I get an error when gcc tries to compile variables which have the same
> name than C++ reserved words : 'operator' and 'bool'. And yet these are not
> reserved words in C, are they ? Is there a special option to turn on to
> make gcc compile these lines anyway ?
>
> Thanks for help
>
>
>
>
> ------------------------------------------------------------------------
> http://felicitari.mymail.ro/



More information about the Gcc-help mailing list