This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: "no return statement" warning weirdness
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: Ulrich Weigand <weigand at i1 dot informatik dot uni-erlangen dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 18 Mar 2004 20:39:53 +0000
- Subject: Re: "no return statement" warning weirdness
- References: <200403181830.TAA09985@faui1d.informatik.uni-erlangen.de>
Ulrich Weigand wrote:-
> function f1 triggers the warning:
> testcase.c: In function `f1':
> testcase.c:4: warning: no return statement in function returning non-void
>
> but for function f2 this warning is not generated.
> However, when using 'long int' instead of 'long', the warning is back.
>
> This appears to be due to a check for C_FUNCTION_IMPLICIT_INT before
> emitting the warning: when using just 'long', this flag is set to 1,
> and if the flag is 1 the warning is not output.
>
> Is this supposed to work that way?
IMO we should warn whether implicit int or not.
Neil.