Problem with the packed attribute using with "typdef" (gcc-2.95)

Richard Dabrowski dabrowski.r@stn-atlas.de
Tue Mar 4 13:43:00 GMT 2003


Hi,
  I have a problem with the packed attribute using with "typdef" (gcc-2.95):

  If I define

typedef struct
{
  unsigned short int a;
  unsigned short int b;
  unsigned long      c;
  unsigned short int d;
  unsigned short int e;
  unsigned short int f;
} TEST_T __attribute__ ((packed));

TEST_T test_a;
size_t test;

test = sizeof(test_a);


i see test = 16;   // should be 14 !

is this problem known?
what is the solution?

Regards

Richard Dabrowski


------------------------------------------------------------------------
STN ATLAS Elektronik GmbH
Abt. LFG T4
Sebaldsbrücker Heerstraße 235
28305 Bremen

Tel.: +49/421/457-1404
Fax: +49/421/457-1649



More information about the Gcc-bugs mailing list