public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/42674]  New: Bogus "no return statement in function returning non-void" warning
@ 2010-01-09 19:10 davek at gcc dot gnu dot org
  2010-01-09 20:49 ` [Bug middle-end/42674] [4.5 Regression] " hjl dot tools at gmail dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: davek at gcc dot gnu dot org @ 2010-01-09 19:10 UTC (permalink / raw)
  To: gcc-bugs

Simple testcase not even worth attaching preprocessed source for, using
HEAD@155680.  Note that this only arises in C++, not when compiled as C:

------------------------------------------------------------------------
$ cat badwarn.cpp

extern void bar (void);
int foo (void) __attribute__ ((__noreturn__));

int
foo (void)
{
  while (1)
  {
    bar ();
  }
}

$ g++-4 -c badwarn.cpp  -Wall
badwarn.cpp: In function 'int foo()':
badwarn.cpp:12:1: warning: no return statement in function returning non-void
------------------------------------------------------------------------

Discussed on the list at http://gcc.gnu.org/ml/gcc/2010-01/threads.html#00180;
Ross Smith identified this as a regression as it does not arise with 4.0.1,
4.2.1 and 4.3.4, and HJ tracked it to r.138140:

http://gcc.gnu.org/ml/gcc-cvs/2008-07/msg00852.html


-- 
           Summary: Bogus "no return statement in function returning non-
                    void" warning
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: davek at gcc dot gnu dot org
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin


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


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

end of thread, other threads:[~2010-01-14 23:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-09 19:10 [Bug middle-end/42674] New: Bogus "no return statement in function returning non-void" warning davek at gcc dot gnu dot org
2010-01-09 20:49 ` [Bug middle-end/42674] [4.5 Regression] " hjl dot tools at gmail dot com
2010-01-10 22:08 ` [Bug middle-end/42674] [4.4/4.5 " rguenth at gcc dot gnu dot org
2010-01-11  0:24 ` davek at gcc dot gnu dot org
2010-01-11 18:18 ` manu at gcc dot gnu dot org
2010-01-11 19:08 ` davek at gcc dot gnu dot org
2010-01-13 17:38 ` jakub at gcc dot gnu dot org
2010-01-13 18:07 ` jakub at gcc dot gnu dot org
2010-01-14 16:38 ` rguenth at gcc dot gnu dot org
2010-01-14 22:44 ` jakub at gcc dot gnu dot org
2010-01-14 22:50 ` jakub at gcc dot gnu dot org
2010-01-14 23:20 ` jakub at gcc dot gnu dot 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).