This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/51647] New: [4.7 Regression] Bogus "control reaches end of non-void function [-Wreturn-type]"


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51647

             Bug #: 51647
           Summary: [4.7 Regression] Bogus "control reaches end of
                    non-void function [-Wreturn-type]"
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org
              Host: x86_64-unknown-linux-gnu


Created attachment 26157
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26157
test case

With the current trunk, I get:

$ g++ -S -Wall bogus_warn.cc
bogus_warn.cc: In function âint nsp::test(nsp::LookupResult*)â:
bogus_warn.cc:44:1: warning: control reaches end of non-void function
[-Wreturn-type

While using g++ 4.6, no warning is shown.

Looking at my builds (no warranty):
No warning with: 2011-11-06 (Rev. 181031)
   Warning with: 2011-11-11 (Rev. 181283)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]