[Bug c++/16784] New: Wrong warning : control reaches end of non-void function
sylvain dot pion at sophia dot inria dot fr
gcc-bugzilla@gcc.gnu.org
Tue Jul 27 16:08:00 GMT 2004
g++ 3.5, with -Wall, emits a buggy warning for the code below.
g++ 3.4 works fine.
--------------------
struct A {
A() {}
~A() {}
};
int k()
{
A K;
bool b;
if ( b ) {
A G;
return 0;
}
else
return 0;
}
--------------------
spion@termite:~/GCC> ./Linux/bin/g++ -Wall -c warn_3_5.C
warn_3_5.C: In function `int k()':
warn_3_5.C:17: warning: control reaches end of non-void function
--
Summary: Wrong warning : control reaches end of non-void function
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sylvain dot pion at sophia dot inria dot fr
CC: gcc-bugs at gcc dot gnu dot org,sylvain dot pion at
sophia dot inria dot fr
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16784
More information about the Gcc-bugs
mailing list