> he claimed it to be a halting problem and that the compiler couldn't determine that all paths didnt return a value.
Theoretically we can't determine whether a function will return a value or not. In practice, heuristics get 99% of the way and the last 1% you can make the programmer put in a possibly redundant return statement.