This is the mail archive of the gcc-bugs@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]

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


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


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