Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-core-dev] __cplusplus not defined for ParserLanguage.CPP

Something i found in CDT 1.2.1, but didn't see a solution in CDT 2.0M7 either.

Stroustrup says "The macro __cplusplus is defined by every C++ compiler." But it is not defined in our scanner when our project has a CCNature. So when we have common C/C++ headers with such definitions in them:

#ifndef __cplusplus
	enum {false, true};
#endif

we blow right through the ifndef and the parser fails when the enum specifier code checks for false being an identifier and finds it is a C++ token. Shouldn't this be defined for our parser or did we intend for each C++ project to define this symbol?

Thanks.

-Keithen


Back to the top