On Sun, Jul 27, 2008 at 1:18 PM, Gerald Pfeifer <[EMAIL PROTECTED]> wrote:
> I believe the following happened in the last 48 or so hours; I saw
> this triggered by my nightly Wine builds which in turn use my nightly
> GCC builds. ;-)
>
> For code like the following where we have an infinite loop in a
> non-void function, we now (incorrectly) issue a warning with all
> of -O0, -O1 and -O2 whereas previously we would not:
>
> void g();
>
> int f() {
> for(;;)
> g();
> }
>
> % gccvs -c -Wall x.c
> x.c: In function 'int f()':
> x.c:6: warning: no return statement in function returning non-void
I think the warning is perfectly correct. There is no return statement
in that function and it does return non-void. The warning doesn't say
that the function does return without a value.
Richard.