commit e21b9b0779b6daa0e082d059ce6a179f4b454bef
parent 12e814ef8e1192fd7071d075c2b152f080ab39aa
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Fri, 17 Jul 2015 22:56:38 +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
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git 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;
}