This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: a warning to implement
- From: dewar at gnat dot com (Robert Dewar)
- To: aoliva at redhat dot com, pcarlini at unitus dot it
- Cc: coola at ngs dot ru, gcc at gcc dot gnu dot org
- Date: Sat, 2 Feb 2002 19:09:10 -0500 (EST)
- Subject: Re: a warning to implement
<<Such usage is explicitly allowed in the C and C++ Standards. I'll
grant you it's of dubious use, but one of the legal uses I can think
for it is to avoid getting a warning about a variable being used
uninitialized when you know for sure that it is not, but the compiler
can't tell as much. For example:
>>
Obviously this dubious use should generate a warning, and most certainly
it should be enabled by -Wall. The idea of using this to *avoid* the
warning seems absurd to me. If you want a way of turning off warnings,
implement one, but don't use a clearly bogus construct for the purpose.