[ECOS] How to stop gcc padding structs???

Jesper Skov jskov@cygnus.co.uk
Mon Jan 29 14:15:00 GMT 2001


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


More information about the Ecos-discuss mailing list