This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/31841] New: warning: 'this.0' is used uninitialized in this function
- From: "sylvain dot pion at sophia dot inria dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 May 2007 16:28:32 -0000
- Subject: [Bug c++/31841] New: warning: 'this.0' is used uninitialized in this function
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Compiling the code below with -O2 -Wall produces the buggy warning
mentionned in the subject.
g++ 4.1 and 4.3 do not have this problem.
The code below is pretty minimal (extracted from CGAL).
For example, removing the derivation from the Empty_class
removes the buggy warning.
----------------
struct Empty_class {};
struct C : Empty_class {};
struct M {
static C f() { return C(); }
};
struct R {
C c;
R()
: c(M::f()) {}
};
int main()
{
R r;
return 0;
}
--------------------
--
Summary: warning: 'this.0' is used uninitialized in this function
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sylvain dot pion at sophia dot inria dot fr
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31841