This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33665] [4.1/4.2 regression] Bogus warning: `this.0' is used uninitialized in this function
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Jan 2008 22:30:19 -0000
- Subject: [Bug c++/33665] [4.1/4.2 regression] Bogus warning: `this.0' is used uninitialized in this function
- References: <bug-33665-15187@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from reichelt at gcc dot gnu dot org 2008-01-06 22:30 -------
Confirmed. Here's a further reduced testcase that triggers the warning
already with "-O -Wall":
================================
struct A {};
struct B : A
{
double x, y;
B() : x(), y() {}
};
inline B getB()
{
return B();
}
struct C : B
{
C() : B(getB()) {}
};
C c;
================================
bug.cc: In function 'void __static_initialization_and_destruction_0(int, int)':
bug.cc:7: warning: 'this.0' is used uninitialized in this function
bug.cc:7: note: 'this.0' was declared here
The bug appeared in GCC 4.1.2, but seems to be fixed on mainline.
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2008-01-06 22:30:19
date| |
Summary|Warning: `this.11' is used |[4.1/4.2 regression] Bogus
|uninitialized in this |warning: `this.0' is used
|function |uninitialized in this
| |function
Target Milestone|--- |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33665