summaryrefslogtreecommitdiff
path: root/test/regression/packedstruct2.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/regression/packedstruct2.c')
-rw-r--r--test/regression/packedstruct2.c10
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 };