Unlike Java, in C/C++ following is allowed:
int* foo () { if(x) return p; // what if control reaches here }
This oft
AFAIR Visual Studio 2008 warns you about "execution path that does not have return value". It is allowed in the meaning of that "C++ won't stop you from shooting you in the foot". So you are to think, not the compiler.