This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


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

Re: How to stop gcc padding structs???



typedef struct
{
  volatile unsigned char data __attribute__((packed));
  volatile unsigned char _xxx __attribute__((packed));
} high __attribute((packed));

Replace with

typedef struct
{
  volatile unsigned char data;
  volatile unsigned char _xxx;
} __attribute__((packed)) high ;

and it should work.

Jesper

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