This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: -Wunused don't warn for exit
- From: Ian Lance Taylor <iant at google dot com>
- To: Gabriel Linder <linder at jeuxvideo dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 31 Jan 2007 07:29:27 -0800
- Subject: Re: -Wunused don't warn for exit
- References: <45C064BD.9080908@jeuxvideo.com>
Gabriel Linder <linder@jeuxvideo.com> writes:
> I have a strange behaviour I can't explain with GCC (3.2.2),
3.2.2 is pretty old. The current version is 4.1.1.
> When compiled with gcc -Wunused -Wunreachable-code exit.c I get these
> warnings :
> exit.c: In function `main':
> exit.c:6: warning: statement with no effect
> exit.c:7: warning: statement with no effect
I get these warnings with current gcc:
foo5.c: In function ‘main’:
foo5.c:6: warning: statement with no effect
foo5.c:7: warning: statement with no effect
foo5.c:8: warning: statement with no effect
foo5.c:10: warning: will never be executed
which looks OK to me.
gcc 3.2.2 is no longer supported, so the bug will not be fixed in that
old release.
Ian