a warning to implement
Alexandre Oliva
aoliva@redhat.com
Wed Feb 6 14:04:00 GMT 2002
On Feb 6, 2002, Joe Buck <jbuck@synopsys.com> wrote:
>> On Feb 6, 2002, dewar@gnat.com (Robert Dewar) wrote:
>>
>> > One thing I realize I am confused about now, is it *currently* the case
>> > that gcc documents that
>>
>> > int a = a;
>>
>> > suppresses warnings on a, or is this just a proposed feature?
> Alexandre writes:
>> I've only proposed it as a feature. I don't think this is
>> documented as such.
> It is currently the case *by accident*, and this accident is particularly
> bad in C++, as it suppresses uninitialized variable warnings in
> constructor calls that users would like to see.
> Evidently Alexandre would like to document this accident.
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?
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer
More information about the Gcc
mailing list