public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/51647] New: [4.7 Regression] Bogus "control reaches end of non-void function [-Wreturn-type]"
@ 2011-12-21 10:27 burnus at gcc dot gnu.org
  2011-12-21 10:56 ` [Bug middle-end/51647] " burnus at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-12-21 10:27 UTC (permalink / raw)
  To: gcc-bugs

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)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug middle-end/51647] [4.7 Regression] Bogus "control reaches end of non-void function [-Wreturn-type]"
  2011-12-21 10:27 [Bug middle-end/51647] New: [4.7 Regression] Bogus "control reaches end of non-void function [-Wreturn-type]" burnus at gcc dot gnu.org
@ 2011-12-21 10:56 ` burnus at gcc dot gnu.org
  2011-12-21 11:48 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-12-21 10:56 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug middle-end/51647] [4.7 Regression] Bogus "control reaches end of non-void function [-Wreturn-type]"
  2011-12-21 10:27 [Bug middle-end/51647] New: [4.7 Regression] Bogus "control reaches end of non-void function [-Wreturn-type]" burnus at gcc dot gnu.org
  2011-12-21 10:56 ` [Bug middle-end/51647] " burnus at gcc dot gnu.org
@ 2011-12-21 11:48 ` rguenth at gcc dot gnu.org
  2011-12-21 14:53 ` jakub at gcc dot gnu.org
  2011-12-21 15:47 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-21 11:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-21 11:42:16 UTC ---
Dup of PR51644 I think.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug middle-end/51647] [4.7 Regression] Bogus "control reaches end of non-void function [-Wreturn-type]"
  2011-12-21 10:27 [Bug middle-end/51647] New: [4.7 Regression] Bogus "control reaches end of non-void function [-Wreturn-type]" burnus at gcc dot gnu.org
  2011-12-21 10:56 ` [Bug middle-end/51647] " burnus at gcc dot gnu.org
  2011-12-21 11:48 ` rguenth at gcc dot gnu.org
@ 2011-12-21 14:53 ` jakub at gcc dot gnu.org
  2011-12-21 15:47 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-21 14:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-21 14:51:34 UTC ---
Author: jakub
Date: Wed Dec 21 14:51:19 2011
New Revision: 182589

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182589
Log:
    PR middle-end/51644
    PR middle-end/51647
    * tree-eh.c (decide_copy_try_finally): At -O0, return true
    even when ndests is not 1, if there are only gimple_clobber_p
    (or debug) stmts in the finally sequence.
    * tree-inline.c (estimate_num_insns): Return 0 for gimple_clobber_p
    stmts.

    * gcc.dg/pr51644.c: New test.
    * g++.dg/warn/Wreturn-4.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/warn/Wreturn-4.C
    trunk/gcc/testsuite/gcc.dg/pr51644.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-eh.c
    trunk/gcc/tree-inline.c


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug middle-end/51647] [4.7 Regression] Bogus "control reaches end of non-void function [-Wreturn-type]"
  2011-12-21 10:27 [Bug middle-end/51647] New: [4.7 Regression] Bogus "control reaches end of non-void function [-Wreturn-type]" burnus at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-12-21 14:53 ` jakub at gcc dot gnu.org
@ 2011-12-21 15:47 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-21 15:47 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|                            |DUPLICATE

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-21 15:32:10 UTC ---
Fixed.

*** This bug has been marked as a duplicate of bug 51644 ***


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-12-21 15:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-21 10:27 [Bug middle-end/51647] New: [4.7 Regression] Bogus "control reaches end of non-void function [-Wreturn-type]" burnus at gcc dot gnu.org
2011-12-21 10:56 ` [Bug middle-end/51647] " burnus at gcc dot gnu.org
2011-12-21 11:48 ` rguenth at gcc dot gnu.org
2011-12-21 14:53 ` jakub at gcc dot gnu.org
2011-12-21 15:47 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).