2012-08-09 05:08:34 +08:00
|
|
|
// RUN: %clang_cc1 -triple i686-apple-darwin9 %s -fsyntax-only -verify
|
2012-10-19 20:44:48 +08:00
|
|
|
// expected-no-diagnostics
|
2012-08-09 05:08:34 +08:00
|
|
|
|
|
|
|
// Pragma pack handling with tag declarations
|
|
|
|
|
|
|
|
struct X;
|
|
|
|
|
|
|
|
#pragma pack(2)
|
|
|
|
struct X { int x; };
|
|
|
|
struct Y;
|
|
|
|
#pragma pack()
|
|
|
|
|
|
|
|
struct Y { int y; };
|
|
|
|
|
|
|
|
extern int check[__alignof(struct X) == 2 ? 1 : -1];
|
|
|
|
extern int check[__alignof(struct Y) == 4 ? 1 : -1];
|
|
|
|
|