blob: c87c99d5dab9667ba7bd3e58403b0ff5c5b386ae [file] [log] [blame]
Eli Friedman2016c8c2012-08-08 21:08:34 +00001// RUN: %clang_cc1 -triple i686-apple-darwin9 %s -fsyntax-only -verify
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00002// expected-no-diagnostics
Eli Friedman2016c8c2012-08-08 21:08:34 +00003
4// Pragma pack handling with tag declarations
5
6struct X;
7
8#pragma pack(2)
9struct X { int x; };
10struct Y;
11#pragma pack()
12
13struct Y { int y; };
14
15extern int check[__alignof(struct X) == 2 ? 1 : -1];
16extern int check[__alignof(struct Y) == 4 ? 1 : -1];
17