On Wed, Apr 01, 2015 at 10:57:10AM +0200, Steven Bosscher wrote: > On Wed, Apr 1, 2015 at 10:40 AM, Jakub Jelinek wrote: > > Hi! > > > > The context sensitive macros are inherently C/C++ specific, so trying to > > expand them into anything when preprocessing assembler doesn't make any > > sense to me. > > Why are the <arch>-c.c cpp builtins defined at all when preprocessing > assembly? Or in other words: should these (supposedly) > language-dependent hooks for cpp builtins be called if the > pre-processor is called stand-alone?
The preprocessor, whether invoked through cpp or gcc driver, is still the C (or C++) FE, and when it doesn't preprocess with -x assembler-with-cpp, it still preprocesses C and has to define these. Most of the macros <arch>-c.c defines are needed for assembler preprocessing too, lots of things would break if there wouldn't be on x86_64 say __x86_64__ define. My patch disables just the clearly C/C++ specific macros, I mean defining __vector to __attribute__((...)) where the definition has C/C++ syntax clearly isn't very useful in assembler, and vector contextual macro that expands sometimes to something C specific neither. Jakub