public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19699] New: [4.0 Regression] warning about not returning from end of a non-void function because of dead code
@ 2005-01-29 19:22 pinskia at gcc dot gnu dot org
  2005-01-29 19:23 ` [Bug c++/19699] " pinskia at gcc dot gnu dot org
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-29 19:22 UTC (permalink / raw)
  To: gcc-bugs

Reduced testcase (why don't we remove the dead code before inlining).
void g(void);
inline int f(void)
{
  return 1;
  g();
}
int h(void)
{
  return f();
}

Note this is reduced from:
#include <string>
#include <vector>
void foo(std::vector<std::string> & matches)
{
 char * buf[10];
 matches.insert(matches.end(), buf, buf + 10);
}

(also why does libstdc++ have dead code in its headers.

-- 
           Summary: [4.0 Regression] warning about not returning from end of
                    a non-void function because of dead code
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2005-07-12 15:28 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-29 19:22 [Bug c++/19699] New: [4.0 Regression] warning about not returning from end of a non-void function because of dead code pinskia at gcc dot gnu dot org
2005-01-29 19:23 ` [Bug c++/19699] " pinskia at gcc dot gnu dot org
2005-01-29 19:25 ` [Bug middle-end/19699] " pinskia at gcc dot gnu dot org
2005-01-29 19:30 ` larsbj at gullik dot net
2005-01-30  9:48 ` rth at gcc dot gnu dot org
2005-01-30 15:02 ` pinskia at gcc dot gnu dot org
2005-01-30 15:05 ` pinskia at gcc dot gnu dot org
2005-04-23 23:14 ` [Bug middle-end/19699] [4.0/4.1 " pinskia at gcc dot gnu dot org
2005-04-24 15:23 ` pinskia at gcc dot gnu dot org
2005-04-29 21:52 ` pinskia at gcc dot gnu dot org
2005-05-10 17:36 ` pinskia at gcc dot gnu dot org
2005-05-14 18:14 ` pinskia at gcc dot gnu dot org
2005-05-28 17:50 ` pinskia at gcc dot gnu dot org
2005-05-28 17:54 ` pinskia at gcc dot gnu dot org
2005-05-29  8:44 ` ismail at kde dot org dot tr
2005-05-29 14:40 ` pinskia at gcc dot gnu dot org
2005-06-06 15:20 ` veksler at il dot ibm dot com
2005-06-06 16:07 ` pinskia at gcc dot gnu dot org
2005-06-07 18:00 ` pinskia at gcc dot gnu dot org
2005-07-12 15:30 ` 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).