Consider the following snippet:
void f(void); void g(…) { … return f(); … }
Is this return f(); valid according to C11?
return f();
It clearly states A return statement without an expression shall only appear in a function whose return type is void, try and execute this:
A return statement without an expression shall only appear in a function whose return type is void
void g() { return; // does not return any expression at all } void f() { return g(); } int main(void) { f(); return 0; }