This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
How to pack the following struct in x86?
- From: yinliyin at zte dot com dot cn
- To: gcc at gcc dot gnu dot org
- Date: Thu, 21 Mar 2002 15:58:02 +0800
- Subject: How to pack the following struct in x86?
Hi all,
Is there any method in gcc that could pack the structs followed? Just
like in VC. (Target is intel x86)
#pragma pack(1)
typedef struct tagTPackStruct
{
int i;
char ch;
int ii;
} TPackStruct;
/* other pack struct */
......
#pragma pack()
typedef struct tagTPackStruct
{
int i;
char ch;
int ii;
} TNoPackStruct;
/* Other no pack struct */
......