This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/32245] New: wrong POD type initialization


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]