commit 1e7ba5eee9a86e4e113959c95fca5129727b6d48
parent b949267ae25f86333ceaba22e473deb822b4be23
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sat, 23 May 2015 06:50:16 +0200
Do not remove cpp symbols in nested environments
Preprocessor symbols have translation units scope, so it is wrong to
remove when nested environments are poped.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cc1/symbol.c b/cc1/symbol.c
@@ -43,7 +43,7 @@ popctx(void)
for (sym = head; sym && sym->ctx > curctx; sym = next) {
next = sym->next;
- if (sym->ns == NS_LABEL && curctx != 0) {
+ if (sym->ns == NS_CPP || sym->ns == NS_LABEL && curctx != 0) {
hp->next = sym;
hp = sym;
continue;