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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 17 Aug 2023, Tony Josi via Gcc-help wrote:

> As per the manual -Wpacked means: Warn when the packed attribute has no
> effect on struct layout. But in this case the packed attribute does have an
> impact on the struct layout as it removes the padding between ch2 and ch3,
> but still it causes a warning.

The documentation is incomplete, it wasn't updated when -Wpacked started
diagnosing the situation in your example.

> Though the warning is listed as associated with: -Wattributes.
> It doesn't show up if -Wpacked is not given as a compile option.

That is inconsistent indeed, would you be willing to report it to
the bug tracker at https://gcc.gnu.org/bugzilla/ ?

Alexander



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux