Bug#158704: gcc: gcc compiles incorrect loop
reassign 158704 gcc-2.95
retitle 158704 [fix in 3.2] gcc doesn't warn about unreachable code
tags 158704 + fixed
thanks
$ gcc-3.2 -Wall -W -Wunreachable-code bug-158704.c
bug-158704.c: In function `main':
bug-158704.c:12: warning: will never be executed
Carlos O'Donell writes:
> > >The issue is a rather pedantic one. Should an error be generated
> > >by the compiler indicating that 'return 0' can never be reached?
> >
> > Not an error because the code is in fact correct, but a warning about
> > unreachable code would be nice.
> >
> > Regards,
> > Bart
> >
>
> Originally this had appeared as a item in the 'Non-bugs' section
> of the gcc info documentation, stating that gcc would not introduce
> warnings for unreachable code. However, they have since removed this
> from the info file.
>
> File this as a feature request in GNATS.
>
> c.
>
>
>
> --
> To UNSUBSCRIBE, email to debian-gcc-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: