summaryrefslogtreecommitdiff
path: root/libcpp/directives.c
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-04 23:18:12 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-04 23:18:12 +0000
commit65861c3e930391c2c259fbf497a763d8bae43510 (patch)
tree65c6ea81e590957df7711f8d5092ee7836531093 /libcpp/directives.c
parent9d44fbe3e77fa750336e3b97fb8cfa54f88320ec (diff)
downloadlinaro-gcc-65861c3e930391c2c259fbf497a763d8bae43510.tar.gz
linaro-gcc-65861c3e930391c2c259fbf497a763d8bae43510.tar.bz2
linaro-gcc-65861c3e930391c2c259fbf497a763d8bae43510.zip
PR preprocessor/39213
* directives.c (end_directive): Call _cpp_remove_overlay for deferred pragmas as well in traditional mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168490 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/directives.c')
-rw-r--r--libcpp/directives.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libcpp/directives.c b/libcpp/directives.c
index 6462605c3f4..85a17b146c2 100644
--- a/libcpp/directives.c
+++ b/libcpp/directives.c
@@ -281,16 +281,17 @@ start_directive (cpp_reader *pfile)
static void
end_directive (cpp_reader *pfile, int skip_line)
{
- if (pfile->state.in_deferred_pragma)
- ;
- else if (CPP_OPTION (pfile, traditional))
+ if (CPP_OPTION (pfile, traditional))
{
/* Revert change of prepare_directive_trad. */
- pfile->state.prevent_expansion--;
+ if (!pfile->state.in_deferred_pragma)
+ pfile->state.prevent_expansion--;
if (pfile->directive != &dtable[T_DEFINE])
_cpp_remove_overlay (pfile);
}
+ else if (pfile->state.in_deferred_pragma)
+ ;
/* We don't skip for an assembler #. */
else if (skip_line)
{