This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: "no return statement" warning weirdness
- From: Chris Lattner <sabre at nondot dot org>
- To: Neil Booth <neil at daikokuya dot co dot uk>
- Cc: Ulrich Weigand <weigand at i1 dot informatik dot uni-erlangen dot de>,<gcc at gcc dot gnu dot org>
- Date: Thu, 18 Mar 2004 14:59:08 -0600 (CST)
- Subject: Re: "no return statement" warning weirdness
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/