This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Funny (but bogus) message in non-void function (ss 2000-01-17)



// 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]