diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-03-29 14:42:08 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-03-29 14:42:08 +0000 |
commit | c48a10d65259acee71e1476047958d9a3f7ca8f1 (patch) | |
tree | 3efa9b1510f46afd773cb07e1e77cf1091d5307c /clang/test/Sema/struct-packed-align.c | |
parent | cb6207f72326e4ae1da67b4bb486c252477cbaf0 (diff) | |
download | bcm5719-llvm-c48a10d65259acee71e1476047958d9a3f7ca8f1.tar.gz bcm5719-llvm-c48a10d65259acee71e1476047958d9a3f7ca8f1.zip |
Support __attribute__((packed)) (along with other attributes) at the
end of a struct/class/union in C++, from Justin Bogner!
llvm-svn: 99811
Diffstat (limited to 'clang/test/Sema/struct-packed-align.c')
-rw-r--r-- | clang/test/Sema/struct-packed-align.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Sema/struct-packed-align.c b/clang/test/Sema/struct-packed-align.c index 60a9febafba..2b9456703c7 100644 --- a/clang/test/Sema/struct-packed-align.c +++ b/clang/test/Sema/struct-packed-align.c @@ -37,6 +37,14 @@ struct __attribute__((packed)) packed_fas { extern int d1[sizeof(struct packed_fas) == 1 ? 1 : -1]; extern int d2[__alignof(struct packed_fas) == 1 ? 1 : -1]; +struct packed_after_fas { + char a; + int b[]; +} __attribute__((packed)); + +extern int d1_2[sizeof(struct packed_after_fas) == 1 ? 1 : -1]; +extern int d2_2[__alignof(struct packed_after_fas) == 1 ? 1 : -1]; + // Alignment struct __attribute__((aligned(8))) as1 { |