www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - excess warning?

reply kurimura <kurimura_member pathlink.com> writes:
-----a.d
int main(){
auto Object o=new Object;
return 0;
}
-----
dmd -w a.d
warning - a.d(1): function a.main no return at end of function
Feb 10 2006
parent =?ISO-8859-1?Q?Jari-Matti_M=E4kel=E4?= <jmjmak utu.fi.invalid> writes:
kurimura wrote:
 -----a.d
 int main(){
 auto Object o=new Object;
 return 0;
 }
 -----
 dmd -w a.d
 warning - a.d(1): function a.main no return at end of function
 
 
Confirmed with dmd 0.147 on linux. The problem is in the handling of the auto statement. Compiles fine without warnings. -- Jari-Matti
Feb 16 2006