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