Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp0x/initlist108.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 // PR c++/80864 | |
2 // { dg-do compile { target c++11 } } | |
3 // { dg-options "-Wmissing-braces" } | |
4 | |
5 struct S { | |
6 char c[1]; | |
7 }; | |
8 | |
9 template <typename T> | |
10 void | |
11 fn () | |
12 { | |
13 constexpr S s1 = S{}; | |
14 constexpr S s2 = S{{}}; | |
15 constexpr S s3 = S{{{}}}; | |
16 constexpr S s4 = {}; | |
17 constexpr S s5 = {{}}; | |
18 constexpr S s6 = {{{}}}; | |
19 constexpr S s7{{}}; | |
20 constexpr S s8{S{}}; | |
21 constexpr S s9{S{{}}}; | |
22 constexpr S s10{S{{{}}}}; | |
23 constexpr S s11 = S(); | |
24 constexpr S s12 = S({}); | |
25 constexpr S s13 = S({{}}); | |
26 constexpr S s14 = {{}}; | |
27 constexpr S s15 = {{{}}}; | |
28 } | |
29 | |
30 void | |
31 foo () | |
32 { | |
33 fn<int>(); | |
34 } |