This is a valid function in C++:
int f()
{
if(false)
{
return 42;
}
}
The following definition causes UB:
int x = f(); // return value used
The question: Does the following expression statement cause UB?
f();
Quote from the standard would be very much welcome.