public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/31783]  New: [4.1.2, 4.1.1] bogus "control reaches end of non-void function" warning
@ 2007-05-02  3:01 wad at infinet dot ru
  2007-05-02  6:20 ` [Bug c++/31783] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: wad at infinet dot ru @ 2007-05-02  3:01 UTC (permalink / raw)
  To: gcc-bugs

gcc 4.1.2 and gcc 4.1.1 shows the following bogus warning message.

[wad@hius ~/tests] arm-rtems-gcc -Os -Wall -S test.cpp
test.cpp: In member function 'int attr::create(int)':
test.cpp:17: warning: control reaches end of non-void function

the minimal testcase:

class attr
{
  attr() {}
  ~attr() {}
  int create(int);
};

int attr::create(int c)
{
  attr p;
  switch(c)
  {
    default:
      return 123;
      break;
  }
}


-- 
           Summary: [4.1.2, 4.1.1] bogus "control reaches end of non-void
                    function" warning
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wad at infinet dot ru


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


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

* [Bug c++/31783] [4.1.2, 4.1.1] bogus "control reaches end of non-void function" warning
  2007-05-02  3:01 [Bug c++/31783] New: [4.1.2, 4.1.1] bogus "control reaches end of non-void function" warning wad at infinet dot ru
@ 2007-05-02  6:20 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-02  6:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2007-05-02 07:20 -------


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


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE
            Summary|[4.1.2, 4.1.1] bogus        |[4.1.2, 4.1.1] bogus
                   |"control reaches end of non-|"control reaches end of non-
                   |void function" warning      |void function" warning


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


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

end of thread, other threads:[~2007-05-02  6:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-02  3:01 [Bug c++/31783] New: [4.1.2, 4.1.1] bogus "control reaches end of non-void function" warning wad at infinet dot ru
2007-05-02  6:20 ` [Bug c++/31783] " pinskia 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).