From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21229 invoked by alias); 3 Dec 2011 03:09:28 -0000 Received: (qmail 21217 invoked by uid 22791); 3 Dec 2011 03:09:26 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 03 Dec 2011 03:09:13 +0000 From: "pnewell at cs dot cmu.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/51391] New: pragma GCC diag ignored then warning of Winline activates -fno-inline Date: Sat, 03 Dec 2011 03:09:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: preprocessor X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pnewell at cs dot cmu.edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2011-12/txt/msg00209.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51391 Bug #: 51391 Summary: pragma GCC diag ignored then warning of Winline activates -fno-inline Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor AssignedTo: unassigned@gcc.gnu.org ReportedBy: pnewell@cs.cmu.edu In the test program I will be submitting after the bug is in bugzilla, I am using -Winline with g++ -g. Everything works until I try to disable the check in a file with #pragma GCC diagnostic {ignored,warning} "-Winline" ... then it complains that it can't inline as -fno-inline is active ... which it isn't (per what I can see). The two files I have included are inlineBug.cpp and inlineBug.h. The offending pragmas are in inlineBug.cpp. I am sending the file with them active. I think the problem is with the second one as it seems that it doesn't matter whether I ask it to ignore, its the re-activation as warning that seems to do it. The command I am using to compile is: g++ -g -Winline -o inlineBug inlineBug.cpp I have also attached the output of a bad make/build This is being run on a Fedora14 x86_64 system with their latest yum update of 4.5.1 which g++ -v give as "gcc version 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC)" As this is the first bug I have submitted to gcc bugzilla, please let me know if I have forgotten anything that I need to tell you. And, of course, let me know if I can run any more tests to help resolve this (assuming that it is a bug and not already fixed -- I didn't see anything when searching under "Winline fno-inline") Thanks, Paul