This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19699] New: [4.0 Regression] warning about not returning from end of a non-void function because of dead code
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jan 2005 19:22:15 -0000
- Subject: [Bug c++/19699] New: [4.0 Regression] warning about not returning from end of a non-void function because of dead code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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