2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2008-10-05 03:21:03 +08:00
|
|
|
|
2008-10-05 03:38:15 +08:00
|
|
|
// Note that this puts the expected lines before the directives to work around
|
|
|
|
// limitations in the -verify mode.
|
|
|
|
|
|
|
|
/* expected-warning {{missing '(' after '#pragma pack'}}*/ #pragma pack 10
|
2008-10-05 03:21:03 +08:00
|
|
|
#pragma pack()
|
|
|
|
#pragma pack(8)
|
|
|
|
|
2008-10-05 03:38:15 +08:00
|
|
|
/*expected-warning {{unknown action for '#pragma pack'}}*/ #pragma pack(hello)
|
2008-10-05 03:21:03 +08:00
|
|
|
#pragma pack(push)
|
|
|
|
#pragma pack(pop)
|
|
|
|
|
2008-11-24 05:45:46 +08:00
|
|
|
/* expected-warning {{expected integer or identifier in '#pragma pack'}}*/ #pragma pack(push,)
|
|
|
|
/* expected-warning {{expected integer or identifier in '#pragma pack'}}*/ #pragma pack(push,)
|
|
|
|
/* expected-warning {{expected integer or identifier in '#pragma pack'}}*/ #pragma pack(pop,)
|
2008-10-05 03:21:03 +08:00
|
|
|
|
|
|
|
#pragma pack(push,i)
|
2008-11-24 05:45:46 +08:00
|
|
|
/* expected-warning {{expected integer or identifier in '#pragma pack'}}*/ #pragma pack(push,i,
|
|
|
|
/* expected-warning {{expected integer or identifier in '#pragma pack'}}*/ #pragma pack(push,i,)
|
|
|
|
/* expected-warning {{expected integer or identifier in '#pragma pack'}}*/ #pragma pack(push,i,help)
|
2008-10-05 03:21:03 +08:00
|
|
|
|
|
|
|
#pragma pack(push,8)
|
2008-10-05 03:45:56 +08:00
|
|
|
/* expected-warning {{missing ')' after '#pragma pack'}}*/ #pragma pack(push,8,
|
2008-10-05 03:38:15 +08:00
|
|
|
/* expected-warning {{missing ')' after '#pragma pack'}}*/ #pragma pack(push,8,)
|
|
|
|
/* expected-warning {{missing ')' after '#pragma pack'}}*/ #pragma pack(push,i,8
|
2008-10-05 03:21:03 +08:00
|
|
|
#pragma pack(push,i,8)
|
|
|
|
|
2008-10-05 03:38:15 +08:00
|
|
|
/* expected-warning {{missing ')' after '#pragma pack'}}*/ #pragma pack(push
|
2008-10-05 03:21:03 +08:00
|
|
|
|
|
|
|
_Pragma("pack(push)")
|
2008-11-24 05:45:46 +08:00
|
|
|
/* expected-warning {{expected integer or identifier in '#pragma pack'}}*/ _Pragma("pack(push,)")
|