From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74038 invoked by alias); 3 Jun 2015 08:27:40 -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 73986 invoked by uid 48); 3 Jun 2015 08:27:35 -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: Wed, 03 Jun 2015 08:27: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-Resolution: 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: attachments.created 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: 2015-06/txt/msg00265.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D53431 --- Comment #10 from Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez --- Created attachment 35688 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D35688&action=3Dedit WIP patch A WIP patch. I took a different approach: Move the handling of the pragma to the preprocessor.=20 It is a bit ugly, but the problem is that we cannot access diagnostic.h and similar headers from the preprocessor. In my ideal world, we would have a libdiagnostic.a that can be linked to the preprocessor and the FEs, and avo= id those callbacks (if someone wants to implement a different diagnostic outpu= t, they can simply implement a basic libdiagnostic.a). The main problem I didn't know how to solve is that, once processed, the preprocessor removes the pragmas. Ideally, the pragmas should be evaluated = when lexing, independently of whether the file is preprocessed or not. Otherwise= , it will break things like ccache. >>From gcc-bugs-return-487934-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jun 03 08:27:44 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 74478 invoked by alias); 3 Jun 2015 08:27:44 -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 74029 invoked by uid 48); 3 Jun 2015 08:27:39 -0000 From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/64223] same warning repeated twice with same line number Date: Wed, 03 Jun 2015 08:27: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.8.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mpolacek at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org X-Bugzilla-Target-Milestone: 6.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution 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: 2015-06/txt/msg00266.txt.bz2 Content-length: 438 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64223 Marek Polacek changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #7 from Marek Polacek --- Should be fixed.