summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/pragma-pack-6.c
blob: 40659c23bda879ee7ef03c2ca299929af8df368e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: %clang_cc1 -triple i686-apple-darwin9 %s -fsyntax-only -verify

// 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];

OpenPOWER on IntegriCloud