RE: error messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux