This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/32245] New: wrong POD type initialization
- From: "s__nakayama at infoseek dot jp" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jun 2007 13:37:35 -0000
- Subject: [Bug c++/32245] New: wrong POD type initialization
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
testcase:
#include <cassert>
struct foo
{
int mem1;
int foo::* mem2;
};
int main()
{
foo x = {0};
assert(x.mem2 == foo().mem2);
return 0;
}
result:
$ g++42 bug.cpp -o bug; ./bug
assertion "x.mem2 == foo().mem2" failed: file "bug.cpp", line 12
Aborted (core dumped)
--
Summary: wrong POD type initialization
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: s__nakayama at infoseek dot jp
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32245