1 // Test this without pch.
2 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 %s -include %s -verify -fsyntax-only -Wno-pragma-pack -DSET
3 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 %s -include %s -verify -fsyntax-only -Wno-pragma-pack -DRESET
4 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 %s -include %s -verify -fsyntax-only -Wno-pragma-pack -DPUSH
5 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 %s -include %s -verify -fsyntax-only -Wno-pragma-pack -DPUSH_POP
6 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 %s -include %s -verify -fsyntax-only -Wno-pragma-pack -DPUSH_POP_LABEL
9 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 %s -Wno-pragma-pack -DSET -emit-pch -o %t
10 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 %s -Wno-pragma-pack -DSET -verify -include-pch %t
11 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 %s -Wno-pragma-pack -DRESET -emit-pch -o %t
12 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 %s -Wno-pragma-pack -DRESET -verify -include-pch %t
13 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 %s -Wno-pragma-pack -DPUSH -emit-pch -o %t
14 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 %s -Wno-pragma-pack -DPUSH -verify -include-pch %t
15 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 %s -Wno-pragma-pack -DPUSH_POP -emit-pch -o %t
16 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 %s -Wno-pragma-pack -DPUSH_POP -verify -include-pch %t
17 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 %s -Wno-pragma-pack -DPUSH_POP_LABEL -emit-pch -o %t
18 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 %s -Wno-pragma-pack -DPUSH_POP_LABEL -verify -include-pch %t
34 #pragma pack (push, 2)
38 #pragma pack (push, 4)
39 #pragma pack (push, 2)
44 #pragma pack (push, a, 4)
45 #pragma pack (push, b, 1)
46 #pragma pack (push, c, 2)
53 #pragma pack(show) // expected-warning {{value of #pragma pack(show) == 1}}
54 #pragma pack(pop) // expected-warning {{#pragma pack(pop, ...) failed: stack empty}}
58 #pragma pack(show) // expected-warning {{value of #pragma pack(show) == 8}}
60 #pragma pack(show) // expected-warning {{value of #pragma pack(show) == 8}}
64 #pragma pack(show) // expected-warning {{value of #pragma pack(show) == 2}}
66 #pragma pack(show) // expected-warning {{value of #pragma pack(show) == 1}}
68 #pragma pack (show) // expected-warning {{value of #pragma pack(show) == 8}}
69 #pragma pack(pop) // expected-warning {{#pragma pack(pop, ...) failed: stack empty}}
73 #pragma pack(show) // expected-warning {{value of #pragma pack(show) == 4}}
75 #pragma pack(show) // expected-warning {{value of #pragma pack(show) == 8}}
76 #pragma pack(pop) // expected-warning {{#pragma pack(pop, ...) failed: stack empty}}
80 #pragma pack(show) // expected-warning {{value of #pragma pack(show) == 4}}
82 #pragma pack(show) // expected-warning {{value of #pragma pack(show) == 4}}
84 #pragma pack(show) // expected-warning {{value of #pragma pack(show) == 8}}
85 #pragma pack(pop) // expected-warning {{#pragma pack(pop, ...) failed: stack empty}}
86 #pragma pack(pop, b) // expected-warning {{#pragma pack(pop, ...) failed: stack empty}}
87 #pragma pack(show) // expected-warning {{value of #pragma pack(show) == 8}}