Reputation: 628
I had this issue here. Support told me, that the compiler aligns the overall packed struct size to 2.
Is this normal behavior? I guess packing is not defined in the c language standard, since it requires compiler specific pragmas, so it is probably not violating any standards. What might be the reasons for a compiler to align the packed struct size to 2 instead of the expected 1?
Note: compiler Hightec Tricore 9.0.0, clang compiler, only used for the Infineon Tricore microcontrollers, which all have 32-bits (as far as I know).
Upvotes: 0
Views: 16