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]
Other format: [Raw text]

[Bug c++/12770] [tree-ssa] False warning about no return statement in function


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


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