public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/31841]  New: warning: 'this.0' is used uninitialized in this function
@ 2007-05-05 16:28 sylvain dot pion at sophia dot inria dot fr
  2007-05-05 18:19 ` [Bug c++/31841] " rguenth at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: sylvain dot pion at sophia dot inria dot fr @ 2007-05-05 16:28 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-03-30 21:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-05 16:28 [Bug c++/31841] New: warning: 'this.0' is used uninitialized in this function sylvain dot pion at sophia dot inria dot fr
2007-05-05 18:19 ` [Bug c++/31841] " rguenth at gcc dot gnu dot org
2009-02-09 16:06 ` [Bug middle-end/31841] [4.2 regression] bogus is used uninitialized (warning in dead code) manu at gcc dot gnu dot org
2009-03-30 21:47 ` jsm28 at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).