1 // RUN: %clang_cc1 -triple i686-apple-darwin9 -fsyntax-only -verify %s
3 /* expected-warning {{value of #pragma pack(show) == 8}} */ #pragma pack(show)
4 /* expected-warning {{expected #pragma pack parameter to be}} */ #pragma pack(3)
5 /* expected-warning {{value of #pragma pack(show) == 8}} */ #pragma pack(show)
7 /* expected-warning {{value of #pragma pack(show) == 4}} */ #pragma pack(show)
8 #pragma pack() // resets to default
9 /* expected-warning {{value of #pragma pack(show) == 8}} */ #pragma pack(show)
11 #pragma pack(push, eek, 16) // -> (eek, 2), 16
12 /* expected-warning {{value of #pragma pack(show) == 16}} */ #pragma pack(show)
13 #pragma pack(push) // -> (eek, 2), (, 2), 16
14 /* expected-warning {{value of #pragma pack(show) == 16}} */ #pragma pack(show)
16 #pragma pack(push, 8) // -> (eek, 2), (, 2), (, 1), 8
17 /* expected-warning {{value of #pragma pack(show) == 8}} */ #pragma pack(show)
18 #pragma pack(pop) // -> (eek, 2), (,2), 1
19 /* expected-warning {{value of #pragma pack(show) == 1}} */ #pragma pack(show)
20 #pragma pack(pop, eek)
21 /* expected-warning {{value of #pragma pack(show) == 2}} */ #pragma pack(show)
22 /* expected-warning {{pack(pop, ...) failed: stack empty}} */ #pragma pack(pop)
26 /* expected-warning {{value of #pragma pack(show) == 16}} */ #pragma pack(show)
29 // Warn about unbalanced pushes.
30 #pragma pack (push,4) // expected-warning {{unterminated '#pragma pack (push, ...)' at end of file}}
31 #pragma pack (push) // expected-warning {{unterminated '#pragma pack (push, ...)' at end of file}}
32 #pragma pack () // expected-note {{did you intend to use '#pragma pack (pop)' instead of '#pragma pack()'?}}