From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23093 invoked by alias); 22 Jul 2015 11:24:15 -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 23043 invoked by uid 48); 22 Jul 2015 11:24:11 -0000 From: "noloader at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/53431] C++ preprocessor ignores #pragma GCC diagnostic Date: Wed, 22 Jul 2015 11:24: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: noloader at gmail dot com 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: 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-07/txt/msg01888.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431 --- Comment #16 from Jeffrey Walton --- (In reply to Jonathan Wakely from comment #15) > (In reply to Jeffrey Walton from comment #13) > > This issued caused Crypto++ to remove -Wall (and above) under GCC. > > That seems to be throwing the baby out with the bathwater. Yeah, for us its a calculated risk. We had other compilers available that worked as expected, so we could lower the bar for GCC. The residual risk is the set of issues GCC will catch minus the set of issues the other compilers will catch. Hopefully, the set is the empty set. > Why not simply use > > -Wall -Wno-unused-value -Wno-unused-variable > We don't want to pollute the command line. All in all, the best solution for us from a usability and engineering standpoint is to have the GCC diagnostic block work as advertised. Then, we manage our warnings in our headers and source code through the GCC block, and they don't cross pollinate into the user's code. And the users of the library do not need to worry about disabling warnings on the command line. Without GCC diagnostic blocks, users of the library must guess at what needs to be on the command line when compiling and linking against the library. And then they wonder why we did not take the time to clear or silence the warning.