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: a warning to implement


dewar@gnat.com (Robert Dewar) writes:

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

Well, that construct have been debated to death in the C++ committee.
And given the length of the debate and the opinions expressed there I
would certainly *not* characterize it as obviously dubious.  I would
object to have it enabled by -Wall.

-- Gaby


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