Gcc 4.8.3 does not spot missing 'return' keyword
问题 Let's look at such piece of code: #include <iostream> int foo(int i) {return i; } int foobar(int z) {return foo(z);} int main() { std::cout << foobar(3) << std::endl; } It compiles fine with g++ -std=c++11 ... and gives output 3. But The same output is given by: #include <iostream> int foo(int i) {return i; } int foobar(int z) { foo(z);} int main() { std::cout << foobar(3) << std::endl; } It compiles without problems but clearly the keyword return is missed in foobar. Is it a bug in gcc 4.8.3