http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55189



--- Comment #2 from meanone <meanarbez at gmail dot com> 2012-11-03 11:11:15 
UTC ---

(In reply to comment #1)

> (In reply to comment #0)

> > Compiled with MinGW port of g++, compiles without errors or warnings:

> 

> It does warn if you ask it to: -Wall



I can understand that this is ok behavior for C, but to have to

EXPLICITLY ASK typesafe language like C++ to inform me if function

WITH RETURN TYPE does not return anything ?



If this is not bug why shouldn't we make



int n;

n =;

printf("%d",n);



to be legal code, compiler should simply assign whatever it wants. Right ?



Could anyone explain what for should missing return on typical C++ function

be useful at all ?



Not to mention probability that it has been forgotten by mistake.



-Wreturn-type should be set by default.

Reply via email to