g++ 5.4.1 under Linux (UBUNTU 16.04) will compile the following program without errors or warnings:
#include <iostream>
std::string foo(){
    int a= 1;
    a++;
}
int main(){
    std::cout << foo();
    return 0;
}
Obviously the return statement in "foo()" is missing and the program in my computer core-dumps. I am asking myself why the absence of the return statement is not even warned at compilation time? Did I miss something?
 
     
    