ref: 1e7ba5eee9a86e4e113959c95fca5129727b6d48
parent: b949267ae25f86333ceaba22e473deb822b4be23
author: Roberto E. Vargas Caballero <[email protected]>
date: Sat May 23 02:50:16 EDT 2015
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.
--- a/cc1/symbol.c
+++ b/cc1/symbol.c
@@ -43,7 +43,7 @@
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;