This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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 */
......












Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]