error messages
John (Eljay) Love-Jensen
eljay@adobe.com
Sun Oct 1 16:30:00 GMT 2006
Hi Constantine,
I suspect that your code is being broadsided by macros that are replacing your chosen identifiers.
To see what macro identifiers are live at the end of the preprocessing of your translation unit, use this command:
For C:
gcc -E -dM foo.c | sort
For C++:
gcc -E -dM foo.cpp | sort
I'm not sure if there is any significant differences between the C and C++ preprocessing. Probably a select few predefines are different. On my system, g++ (and a .cpp file) produces these additional defines, which gcc (and a .c file) does not produce:
#define __DEPRECATED 1
#define __EXCEPTIONS 1
#define __GNUG__ 4
#define __GXX_WEAK__ 1
#define __cplusplus 1
#define __private_extern__ extern
And those may trigger different inclusion/exclusion of code block based on their presence, absence, or value.
HTH,
--Eljay
More information about the Gcc-help
mailing list