aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppmacro.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cppmacro.c')
-rw-r--r--gcc/cppmacro.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c
index 35ecc4d..fcaa7c6 100644
--- a/gcc/cppmacro.c
+++ b/gcc/cppmacro.c
@@ -959,7 +959,10 @@ cpp_get_token (pfile, token)
continue;
}
- if (token->val.node != pfile->spec_nodes.n__Pragma)
+ /* Don't interpret _Pragma within directives. The standard is
+ not clear on this, but to me this makes most sense. */
+ if (token->val.node != pfile->spec_nodes.n__Pragma
+ || pfile->state.in_directive)
break;
/* Handle it, and loop back for another token. MI is cleared