[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Sema / pragma-pack-6.c
blobc87c99d5dab9667ba7bd3e58403b0ff5c5b386ae
1 // RUN: %clang_cc1 -triple i686-apple-darwin9 %s -fsyntax-only -verify
2 // expected-no-diagnostics
4 // Pragma pack handling with tag declarations
6 struct X;
8 #pragma pack(2)
9 struct X { int x; };
10 struct Y;
11 #pragma pack()
13 struct Y { int y; };
15 extern int check[__alignof(struct X) == 2 ? 1 : -1];
16 extern int check[__alignof(struct Y) == 4 ? 1 : -1];