This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12770] [tree-ssa] False warning about no return statement in function
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Nov 2003 17:41:24 -0000
- Subject: [Bug c++/12770] [tree-ssa] False warning about no return statement in function
- References: <20031024222640.12770.bangerth@dealii.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2003-11-14 17:41 -------
And finally, here's something self-contained:
--------------------------------
struct X {
~X();
};
bool operator==(const X& , const char* );
bool foo () {
X s;
if (s=="true")
return true;
else
return false;
}
-------------------------------------
tmp/s> ../build-gcc-tree-ssa/gcc-install/bin/c++ -W -Wall -c x.cc
x.cc: In function `bool foo()':
x.cc:14: warning: control reaches end of non-void function
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12770