Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What if you put the array in a struct and made a union of both uint32_t and uint8_t? Would the union with the larger size force the compiler to generate a 4-byte aligned array for the bytes?

I suggest this because it would be portable without any compiler specific stuff.



It's already too late, the data is read from a file so the base of the array can be say at address 0xYYYYY2.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: