Jason Merrill <[email protected]> writes:
> sort_mem_initializers was skipping over all fields without a
> mem-initializer, even ones with an NSDMI.
One of the testcases doesn't compile on Solaris 10/x86:
output is:
/vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/cpp0x/nsdmi-union2.C:4:7:
error: multiple fields in union 'A' initialized
/vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/cpp0x/nsdmi-union2.C: In
constructor 'constexpr A::A()':
/vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/cpp0x/nsdmi-union2.C:4:7:
error: initializations for multiple members of 'A'
/vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/cpp0x/nsdmi-union2.C: At
global scope:
/vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/cpp0x/nsdmi-union2.C:10:3:
note: synthesized method 'constexpr A::A()' first required here
/vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/cpp0x/nsdmi-union2.C: In
constructor 'B::B()':
/vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/cpp0x/nsdmi-union2.C:10:3:
note: synthesized method 'constexpr A::A()' first required here
/vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/cpp0x/nsdmi-union2.C: In
constructor 'B::B()':
/vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/cpp0x/nsdmi-union2.C:15:3:
error: initializations for multiple members of 'B'
and produces a warning:
WARNING: g++.dg/cpp0x/nsdmi-union2.C -std=c++11 compilation failed to produce
executable
Is this really intended to be a run test?
Also, both testcases are missing from gcc/testsuite/ChangeLog.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University