It seems a bug crept in CC ARM, may be not only ARM. Consider next code:
#ifdef IDENTIFIER IDENTIFIER(); #endif
and build output:
..\..\src\module\module.cpp(344): error: #20: identifier "IDENTIFIER" is undefined
GCC does not have such problem. Check <a href=coliru.stacked-crooked.com/.../7e6350bd2bfbc14a >here</a>
Have you ordered the compiler to just preprocess the data and looked at the output?
Post the output from the preprocessor. If the output is wrong, then it's time to contact Keil support.
By the way - you haven't posted specific version information for your tool set.
Lots of people are using the Keil tools.
And lots of people are using conditional compilation.
My code would fail badly if the preprocessor didn't do what it should - it doesn't with the versions I'm currently using. But I seldom jump onto the latest versions until I'm starting a new product. Existing products normally lives their whole life using the compiler that was used when the product was on beta testing. All to make sure that I can rebuild and get a binary-identical copy.