Consider the following snippet:
void f(void);
void g(…)
{
…
return f();
…
}
Is this return f(); valid according to C11?
Anything after return is an expression.
Syntax ... return expressionopt;
And standard says that:
A return statement with an expression shall not appear in a function whose return type is void. ....
f() is also an expression here. The compiler should raise a warning
[Warning] ISO C forbids 'return' with expression, in function returning void [-pedantic]