[Bug c++/11182] gcc should warn when assigning unassigned variables

charles@kde.org gcc-bugzilla@gcc.gnu.org
Sat Jun 14 19:14:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11182



------- Additional Comments From charles@kde.org  2003-06-14 19:14 -------
Subject: Re:  gcc should warn when assigning unassigned variables

On Saturday 14 June 2003 11:27, you wrote:
> > Well, more than "initializing a variable with itself", but "assigning a
> > variable with an uninitialized variable"
> >
> > {
> >       int x;
> >       int y = x;
> > }
> >
> > should warn it as well
>
> Sure it should, but that works already.

Ho hum, you're right, but it depends on -O1, which I think is ironic because 
if you're using -O1, you're probably not doing development, which means you 
probably don't care about it anyway.

Probably a big change though (I don't actually know gcc's code).

-Charles



More information about the Gcc-bugs mailing list