]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR preprocessor/39213 (Preprocessor ICE with -m64 and --traditional-cpp)
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 4 Jan 2011 23:18:29 +0000 (23:18 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 4 Jan 2011 23:18:29 +0000 (23:18 +0000)
PR preprocessor/39213
* directives.c (end_directive): Call _cpp_remove_overlay for deferred
pragmas as well in traditional mode.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r168491

libcpp/ChangeLog
libcpp/directives.c

index 78482d53f4183cb335a9702cb196272ac720ce0c..b2c741fe2d008ee547e4889f171865a97ed87b25 100644 (file)
@@ -1,3 +1,10 @@
+2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
+            Jakub Jelinek  <jakub@redhat.com>
+
+       PR preprocessor/39213
+       * directives.c (end_directive): Call _cpp_remove_overlay for deferred
+       pragmas as well in traditional mode.
+
 2010-12-16  Release Manager
 
        * GCC 4.5.2 released.
index 409d908b4e807bec09366185d76867756d4af382..f0450a7afc03410ad8535e9e01455777e048f843 100644 (file)
@@ -280,16 +280,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)
     {