a warning to implement

Robert Dewar dewar@gnat.com
Sat Feb 2 16:09:00 GMT 2002


<<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.



More information about the Gcc mailing list