This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19808] miss a warning about uninitialized members in constructor
- From: "manu at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Feb 2010 12:59:37 -0000
- Subject: [Bug c++/19808] miss a warning about uninitialized members in constructor
- References: <bug-19808-5329@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from manu at gcc dot gnu dot org 2010-02-24 12:59 -------
This usage could be warned in the front-end. Specially because the SSA form
looks like:
S::S() (struct SD.2093 * const thisD.2102)
{
intD.2 D.2131;
# BLOCK 2, starting at line 6
# PRED: ENTRY (fallthru)
[pr19808.C : 6:20] D.2131_2 = thisD.2102_1(D)->jD.2096;
[pr19808.C : 6:20] thisD.2102_1(D)->iD.2095 = D.2131_2;
[pr19808.C : 6:20] thisD.2102_1(D)->jD.2096 = 1;
[pr19808.C : 6:23] return;
# SUCC: EXIT
}
Since *this is a pointer parameter (why?), the middle-end cannot know that j is
uninitialized.
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808