[Bug c++/19808] miss a warning about uninitialized members in constructor

manu at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Feb 24 12:59:00 GMT 2010



------- 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



More information about the Gcc-bugs mailing list