wumpus
10-09-2003, 10:28 AM
Hi!
I need a byte (uint8 ) array to be aligned on a 2 byte (uint16) boundary. This is for speed reasons, but also because my MDI blit just won't work otherwise without all kinds of kludges and shifts.
uint8 __attribute__((align(2))) blaatschaap[] = {0x02, 0x70, 0x0D, 0x00}; /* MDI execute tests packet */
This does not work, the gcc complains that "attribute align is ignored". And indeed. It is ignored. Why?
I need a byte (uint8 ) array to be aligned on a 2 byte (uint16) boundary. This is for speed reasons, but also because my MDI blit just won't work otherwise without all kinds of kludges and shifts.
uint8 __attribute__((align(2))) blaatschaap[] = {0x02, 0x70, 0x0D, 0x00}; /* MDI execute tests packet */
This does not work, the gcc complains that "attribute align is ignored". And indeed. It is ignored. Why?