1 // PR c++/91364 - Implement P0388R4: Permit conversions to arrays of unknown bound. 2 // { dg-do compile { target c++2a } } 3 // { dg-options "-Wpedantic" } 4 5 // Test flexible array member. Here we're binding int[] to int[]. This worked 6 // even before P0388R4. 7 8 typedef int T[]; 9 extern T arr; 10 T &t1 = arr; 11 12 struct S { 13 int i; 14 int a[]; // { dg-warning "flexible array member" } 15 }; 16 17 void f (int (&)[]); 18 19 void test(S s)20test (S s) 21 { 22 f (s.a); 23 } 24