view gcc/testsuite/g++.dg/cpp1z/has-unique-obj-representations2.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

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