commit e21b9b0779b6daa0e082d059ce6a179f4b454bef Author: Roberto E. Vargas Caballero <k...@shike2.com> AuthorDate: Fri Jul 17 22:56:38 2015 +0200 Commit: Roberto E. Vargas Caballero <k...@shike2.com> CommitDate: Fri Jul 17 23:14:53 2015 +0200
Disable macro expansions in cpp clausules It is mandatory by the standard, and it is needed beause in other case you can have recursion problems diff --git a/cc1/cpp.c b/cc1/cpp.c index b66c45b..b904e5a 100644 --- a/cc1/cpp.c +++ b/cc1/cpp.c @@ -532,6 +532,8 @@ cpp(void) if (*input->p != '#') return 0; ++input->p; + + disexpand = 1; lexmode = CPPMODE; setnamespace(NS_CPPCLAUSES); next(); @@ -544,6 +546,8 @@ cpp(void) if (yytoken != EOFTOK && !cppoff) error("trailing characters after preprocessor directive"); + disexpand = 0; lexmode = CCMODE; + return 1; }