This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Funny (but bogus) message in non-void function (ss 2000-01-17)
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Funny (but bogus) message in non-void function (ss 2000-01-17)
- From: Wolfgang Bangerth <Wolfgang dot Bangerth at IWR dot Uni-Heidelberg dot De>
- Date: Thu, 20 Jan 2000 08:14:49 +0100 (MET)
// With the present 2000-01-17 snapshot, the following program
// produces the funny message "warning: control reaches end of
// non-void function `f ()'" which is certainly not true.
//
// Regards
// Wolfgang
//
//
// Full details:
// source/grid> c++ -v
// Reading specs from /home/people/wolf/Config/gcc-ss-20000117/lib/gcc-lib/sparc-sun-solaris2.6/2.96/specs
// gcc version 2.96 20000117 (experimental)
//
// source/grid> c++ -Wall -c x.cc
// x.cc: In function `bool f ()':
// x.cc:28: warning: control reaches end of non-void function `f ()'
struct X {
~X ();
};
bool operator==(const X&, const X&);
bool f () {
X x[2];
X y;
return (y == y);
};
-------------------------------------------------------------------------
Wolfgang Bangerth email: wolfgang.bangerth@iwr.uni-heidelberg.de
www: http://gaia.iwr.uni-heidelberg.de/~wolf