diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-10-05 08:11:34 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-10-05 08:11:34 +0000 |
commit | a6c369cbd63996c1571ae601b7d92070f024b22c (patch) | |
tree | dc4f3f5a52ae4ea230f307ce5f442137f014b79b /test/regression/packedstruct2.c | |
parent | b55147379939553eccd4289fd18e7f161619be4d (diff) |
Merge of the "alignas" branch.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2342 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test/regression/packedstruct2.c')
-rw-r--r-- | test/regression/packedstruct2.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/test/regression/packedstruct2.c b/test/regression/packedstruct2.c index 0c383a4..37c736e 100644 --- a/test/regression/packedstruct2.c +++ b/test/regression/packedstruct2.c @@ -4,9 +4,7 @@ /* Simple packing */ -#pragma pack(1) - -struct s1 { unsigned short x; int y; char z; }; +struct __packed__ s1 { unsigned short x; int y; char z; }; struct s1 s1 = { 2345, -12345678, 'x' }; @@ -17,9 +15,7 @@ void test1(void) /* Now with byte-swapped fields */ -#pragma pack(1,1,1) - -struct s3 { +struct __packed__(1,1,1) s3 { unsigned char x; unsigned short y; unsigned int z; @@ -47,8 +43,6 @@ void test3(void) /* Back to normal */ -#pragma pack() - struct s4 { unsigned short x; int y; double z; }; struct s4 s4 = { 123, -456789, 3.14159 }; |