Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp0x/constexpr-union5.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
21 constexpr A a; | 21 constexpr A a; |
22 SA((a.i == 42)); | 22 SA((a.i == 42)); |
23 | 23 |
24 struct B | 24 struct B |
25 { | 25 { |
26 struct { | 26 struct { // { dg-warning "10:ISO C\\+\\+ prohibits anonymous struct" } |
27 int h; | 27 int h; |
28 struct { | 28 struct { // { dg-warning "12:ISO C\\+\\+ prohibits anonymous struct" } |
29 union { | 29 union { |
30 unsigned char i; | 30 unsigned char i; |
31 int j; | 31 int j; |
32 }; | 32 }; |
33 int k; | 33 int k; |
34 }; // { dg-warning "anonymous struct" } | 34 }; |
35 }; // { dg-warning "anonymous struct" } | 35 }; |
36 int l; | 36 int l; |
37 | 37 |
38 constexpr B(): h(1), i(2), k(3), l(4) {} | 38 constexpr B(): h(1), i(2), k(3), l(4) {} |
39 }; | 39 }; |
40 | 40 |