On Wed, Apr 01, 2009 at 10:18:32AM -0700, Paul Koning wrote: > The other day there was a request for a compile error if you do: > > int foo(void) { } > > and the answer was "the standard says that this is legal -- after all, > you can say 'foo();' so the return value isn't used and it doesn't > matter that it's missing".
I think that the right answer to requests like this is to recommend the use of -Wall, which will produce foo.c:1: warning: control reaches end of non-void function Those who want it to be an error can say "-Wall -Werror".