1struct A { 2 int a[1]; 3 int b; 4}; 5 6extern int c; 7 8static int o[] = { 9 [__builtin_offsetof(struct A, b)] = 0, // OK 10 [__builtin_offsetof(struct A, a[0])] = 0, // OK 11 [__builtin_offsetof(struct A, a[0*0])] = 0, // OK 12 [__builtin_offsetof(struct A, a[c])] = 0 // KO 13}; 14 15/* 16 * check-name: constexprness __builtin_offsetof() 17 * 18 * check-error-start 19constexpr-offsetof.c:12:39: error: bad constant expression 20 * check-error-end 21 */ 22