This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/30111] Value-initialization of POD base class doesn't initialize members
- From: "jwakely dot gcc at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jun 2007 01:36:56 -0000
- Subject: [Bug c++/30111] Value-initialization of POD base class doesn't initialize members
- References: <bug-30111-5876@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from jwakely dot gcc at gmail dot com 2007-06-18 01:36 -------
Confirmed on x86-linux, sparc-solaris and ppc-AIX so I've removed the Target.
Also verified that valgrind shows the uninitialised memory reads.
This bug breaks common idioms like:
template <typename A, typename B>
struct compressed_pair : A {
compressed_pair() : A(), second_() { }
A& first() { return *this; }
B& second() { return second_; }
private:
B second_;
};
--
jwakely dot gcc at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
GCC target triplet|sparc-sun-solaris2.9 |
Known to fail| |4.2.0 4.1.1 3.4.3 3.3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30111