This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11182] gcc should warn when assigning unassigned variables
- From: "falk dot hueffner at student dot uni-tuebingen dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Jun 2003 18:27:27 -0000
- Subject: [Bug c++/11182] gcc should warn when assigning unassigned variables
- References: <20030613045823.11182.charles@kde.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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 falk.hueffner@student.uni-tuebingen.de 2003-06-14 18:27 -------
Subject: Re: gcc should warn when assigning unassigned variables
"charles@kde.org" <gcc-bugzilla@gcc.gnu.org> writes:
> > ------- Additional Comments From falk.hueffner@student.uni-tuebingen.de
> > int f() { int x = x; return x; }
> >
> > i. e., no warning when initializing a variable with itself, which is
> > already c++/5284 and probably some more.
>
> 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.