a warning to implement
Joe Buck
jbuck@synopsys.COM
Wed Feb 6 14:57:00 GMT 2002
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?
More information about the Gcc
mailing list