http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48192
Summary: Conditional macros should not pass #ifdef Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor AssignedTo: meiss...@gcc.gnu.org ReportedBy: meiss...@gcc.gnu.org Host: powerpc64-linux Target: powerpc64-linux Build: powerpc64-linux The PowerPC port defines 3 conditional macros, vector, bool, and pixel in non-standards complaint mode to implement the Altivec/VSX vector keywords. The rs6000 backend only expands these keywords if the next token is a type or keyword that would be used for the Altivec/VSX vector support, to allow the user to use these 'keywords' as normal identifiers. So vector int foo; would expand vector to the vector __attribute__ to define a vector type, but int vector = 0 would not be expanded. The Spu also defines vector as a conditional macro. No other port currently uses conditional macros. The problem is if the user does: #ifndef bool #define bool char #endif static bool variable = 0; The #ifndef case will not succeed because 'bool' is a macro, but 'bool' will not be expanded because it was not preceded with 'vector'.