From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13831 invoked by alias); 5 Sep 2014 17:42:42 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 13806 invoked by uid 48); 5 Sep 2014 17:42:39 -0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/53431] C++ preprocessor ignores #pragma GCC diagnostic Date: Fri, 05 Sep 2014 17:42:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.7.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: manu at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-09/txt/msg01151.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D53431 --- Comment #9 from Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez --- (In reply to Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez from comment #5) > The C++ parser lexes (and preprocesses) before handling the pragmas, wher= eas > the C parser processes the pragmas as it sees them. >=20 > We must somehow parse these pragmas *also* in cp/parser.c:631. Maybe one = can > do something similar to what we do for cp_parser_initial_pragma, but with= in > the loop and only handling pragma diagnostic. Surely, it will need some > trial and error to get it right. If any of you wants to give it a try and > need some help, just ask here or in the mailing list. There are two problems that need fixing to implement this: 1. At the point the pragma is lexed we don't know that this is pragma GCC diagnostic, since the pragmas are registered dynamically and there is no (e= num pragma_kind) PRAGMA_GCC_DIAGNOSTIC. Perhaps one could do what is done for PRAGMA_GCC_PCH_PREPROCESS. 2. The second problem is that handle_pragma_diagnostic does not work during lexing (at least for C++). We would need to rewrite the whole function and = call it directly. >>From gcc-bugs-return-461319-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Sep 05 17:57:46 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 25263 invoked by alias); 5 Sep 2014 17:57:45 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 25226 invoked by uid 48); 5 Sep 2014 17:57:42 -0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/63188] [5 Regression] r214954 breaks bootstrap on x86_64-apple-darwin13 Date: Fri, 05 Sep 2014 17:57:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: blocker X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-09/txt/msg01153.txt.bz2 Content-length: 555 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63188 --- Comment #5 from Dominique d'Humieres --- Bootstrap of revision r214972 with the patch --- ../_clean/gcc/config/darwin.h 2014-06-27 18:25:13.000000000 +0200 +++ gcc/config/darwin.h 2014-09-05 18:28:29.000000000 +0200 @@ -499,7 +499,7 @@ extern GTY(()) int darwin_ms_struct; #define NO_PROFILE_COUNTERS 1 #undef INIT_SECTION_ASM_OP -#define INIT_SECTION_ASM_OP +#define INIT_SECTION_ASM_OP "" #undef INVOKE__main just completed, testing in progress.