Jonathan Wakely <[email protected]> a écrit: > A return statement with no operand is always wrong, but -Wreturn-type > also warns about this, which is valid: > > int f(int c) > { > if (c) > return 0; > function_that_never_returns(); > } >
[...]
> So maybe it makes sense to split -Wreturn-type to separately handle
> "return with no value in function returning non-void" and "control
> reaches end of non-void function".
That would make sense, yes.
--
Dodji
