This is the mail archive of the
mailing list for the GCC project.
Re: a warning to implement
- From: Joe Buck <jbuck at synopsys dot COM>
- To: aoliva at redhat dot com (Alexandre Oliva)
- Cc: jbuck at synopsys dot COM (Joe Buck), dewar at gnat dot com (Robert Dewar),gdr at codesourcery dot com, phil at jaj dot com, gcc at gcc dot gnu dot org
- Date: Wed, 6 Feb 2002 14:41:18 -0800 (PST)
- Subject: 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?