Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp0x/union5.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // PR c++/49803 |
2 // { dg-do compile { target c++11 } } | |
3 // { dg-options "" } | |
4 | |
5 struct X | |
6 { | |
7 X() = delete; | |
8 }; | |
9 | |
10 union Y | |
11 { | |
12 // N3291=11-0061 12.6.2/8 says no initialization of | |
13 // of other variant members (i.e. m_x) should | |
14 // be performed. | |
15 Y() : m_char1{ } | |
16 { } | |
17 | |
18 struct | |
19 { | |
20 char m_char1; | |
21 }; | |
22 | |
23 X m_x; | |
24 }; |