Forum Discussion
Altera_Forum
Honored Contributor
11 years agoLook at the assembler code generated for your code.
I had a case on an x86 where bit-field access resulted in byte-based assembly instructions, even though the bit-field is described using integers. In your case, since each bit-field is actually a byte, it might be less ambiguous (in the sense of undefined compiler operation) to use an array of bytes. You can use a union to make the array accessible as either a single integer or four single byte fields. Cheers, Dave