This is the mail archive of the gcc@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: if() and trailing ;


 >  > -Wextra enables this warning, as documented. Not 100% sure it
 >  > was there in 3.3.  If not you might want a more recent compiler.
 > 
 > Doesn't work with 3.3, unrecognized option `-Wextra'
 > But with 4.0.1 it does:
 > 
 > test.c:2: warning: empty body in an if-statement
 > 
 > Thanks!
 > Simon

Older versions of gcc called this option simply `-W'.  Try that
instead if you can't use a 4.x gcc.  I'm able to produce a warning
about this problem with 3.4.6, for example.

		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu


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