"no return statement" warning weirdness

Chris Lattner sabre@nondot.org
Thu Mar 18 21:11:00 GMT 2004


On Thu, 18 Mar 2004, Neil Booth wrote:
> > slightly different:
> >
> > int foo() {}
>
> Why?  If it's a void function it only takes another 5 keystrokes to make
> it so.

Good point.  Certainly in the C code I write I specify the return type.
However, there is a lot of existing (often nasty) code in the world.
Will people complain about the new warnings?

I personally am not defending the old way of doing things (it doesn't
effect me), I was just speculating why it was the way it was.

-Chris

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/



More information about the Gcc mailing list