opnsense-src/test/Parser/offsetof.c

8 lines
354 B
C
Raw Normal View History

2010-01-01 05:34:51 -05:00
// RUN: %clang_cc1 -fsyntax-only -verify %s
2009-07-04 09:58:54 -04:00
struct a { struct { int b; } x[2]; };
int a = __builtin_offsetof(struct a, x; // expected-error{{expected ')'}} expected-note{{to match this '('}}
// FIXME: This actually shouldn't give an error
int b = __builtin_offsetof(struct a, x->b); // expected-error{{expected ')'}} expected-note{{to match this '('}}