This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -Wunused don't warn for exit


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]