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: unassig...@gcc.gnu.org
        ReportedBy: pnew...@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

Reply via email to