title: Is a return statement mandatory for C++ functions that do not return void?
body: <p>My Herb Schildt book on C++ says: "... In C++, if a function is declared as returning a value, it <strong>must</strong> return a value." However, if I write a function with a non-void return type and do not return anything, the compiler issues a warning instead of an error: "Control reaches end of non-void function."</p>
  
  <p>I use gcc (MinGW) and have set the -pedantic flag.</p>