Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/desig23.C

raw
1 // PR c++/102740
2 // { dg-do compile { target c++20 } }
3 // { dg-additional-options -Wmissing-braces }
4
5 typedef struct {
6 union {
7 struct {
8 const void* content;
9 } put;
10 };
11 } op_t;
12
13 op_t f(const char* alias) {
14 return op_t{
15 .put =
16 {
17 .content = alias,
18 },
19 }; // { dg-warning "missing braces" }
20 }