aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/desig23.C
blob: 4354e644f6aa03101fda306fc40876059fa35063 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// PR c++/102740
// { dg-do compile { target c++20 } }
// { dg-additional-options -Wmissing-braces }

typedef struct {
    union {
        struct {
            const void* content;
        } put;
    };
} op_t;

op_t f(const char* alias) {
    return op_t{
        .put =
            {
                .content = alias,
            },
    };				// { dg-warning "missing braces" }
}