arm-none-eabi-gcc: packed attribute causes inefficient alignment

Alexander Monakov amonakov@ispras.ru
Thu Aug 17 20:23:12 GMT 2023


On Fri, 18 Aug 2023, Tony Josi wrote:

> So basically the compiler is trying to warn that with the packed attribute
> the fields that are aligned relative to the struct can be aligned
> inefficiently as the alignment of the entire struct is now 1.
> 
> If that's the case, I'm not sure what's the purpose of this warning, isn't
> it quite expected?

I'm not sure either. You may get more information by filing a bug about
unclear documentation and confusing behavior of this warning.

Alexander


More information about the Gcc-help mailing list