Forum Discussion
Altera_Forum
Honored Contributor
21 years agoAlignment of structures
Hello, I know that this is very basic question which is not only relating to Nios. In the web and in the documentation of GCC I didn’t find a satisfactory answer. Will a structure like the...
Altera_Forum
Honored Contributor
21 years agoHello,
So something like the following will force the compiler that the structure will begin within a 4 byte boundary. Is that correct? struct __attribute__ ((aligned (4))) TEthernetHeader { u8_t dest[6]; u8_t src[6]; u16_t type; }; Regards, niosIIuser