Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/has-unique-obj-representations2.C

raw
1 struct S;
2 struct T { S t; }; // { dg-error "14:field .t. has incomplete type" }
3 struct U { int u[sizeof (S)]; }; // { dg-error "18:invalid application of .sizeof. to incomplete type" }
4 union V { char c; char d[]; }; // { dg-error "24:flexible array member in union" }
5 bool a = __has_unique_object_representations (S); // { dg-error "incomplete type" }
6 bool b = __has_unique_object_representations (T);
7 bool c = __has_unique_object_representations (U);
8 bool d = __has_unique_object_representations (V);