diff options
author | Michael Forney <mforney@mforney.org> | 2019-04-17 15:07:39 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2019-04-17 20:10:52 -0700 |
commit | 2833c0041d669bc1ba7a6d13e7f92c23b84e04ae (patch) | |
tree | 785c3a487631778490d40dcb2d1b5809e2993ae2 /test/builtin-offsetof.c | |
parent | 88aa3b6891678669548f01a0f87c36a993694320 (diff) |
Allow designators in __builtin_offsetof
Diffstat (limited to 'test/builtin-offsetof.c')
-rw-r--r-- | test/builtin-offsetof.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/builtin-offsetof.c b/test/builtin-offsetof.c new file mode 100644 index 0000000..1737d0e --- /dev/null +++ b/test/builtin-offsetof.c @@ -0,0 +1,9 @@ +struct s { + struct { + union { + float z; + char *c; + } b; + } a[5]; +}; +int x = __builtin_offsetof(struct s, a[2].b.c); |