Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/paren-init8.C

raw
1 // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
2 // { dg-do compile { target c++20 } }
3
4 // Test that we don't accept designated inits in ( ).
5
6 struct S {
7 int i;
8 int j = 42;
9 };
10
11 S s(.i = 12); // { dg-error "expected" }
12
13 int a[]([0] = 42); // { dg-error "" }