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


Re: int a = a, Alexandre writes:

> I hereby withdraw my suggestion, in case I haven't done so yet.
> Thanks for pointing out my glaring mistake *blush* :-)  It's indeed
> bogus.  At the very least, the use of a's rvalue in the RHS of its
> first assignment should be warned about.  Perhaps this would be
> enough, and we don't need any further warnings?

Currently the uninitialized variable warning points at the declaration of
the variable.  I don't think that a separate warning for self-assignment
is needed if it is just flagged as "may be used unitialized".

I am curious, though.  Can anyone point to existing free software that
is using this, um, feature to supress warnings?




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