From: Eric Botcazou Date: Tue, 4 Jan 2011 23:18:29 +0000 (+0000) Subject: re PR preprocessor/39213 (Preprocessor ICE with -m64 and --traditional-cpp) X-Git-Tag: releases/gcc-4.5.3~328 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6e541d32a628d3171319801184bd51acd0a77c1;p=thirdparty%2Fgcc.git re PR preprocessor/39213 (Preprocessor ICE with -m64 and --traditional-cpp) PR preprocessor/39213 * directives.c (end_directive): Call _cpp_remove_overlay for deferred pragmas as well in traditional mode. Co-Authored-By: Jakub Jelinek From-SVN: r168491 --- diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 78482d53f418..b2c741fe2d00 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,10 @@ +2011-11-04 Eric Botcazou + Jakub Jelinek + + 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. diff --git a/libcpp/directives.c b/libcpp/directives.c index 409d908b4e80..f0450a7afc03 100644 --- a/libcpp/directives.c +++ b/libcpp/directives.c @@ -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) {