You have undefined behaviour because you're not returning anything from a function that has a non-void
return type.
§6.6.3:
Flowing off the end of a function is equivalent to a return with no value; this results in undefined behavior in a value-returning function.
§1.3.24:
undefined behavior
behavior for which this International Standard imposes no requirements