On Fri, Aug 19, 2022 at 6:13 AM Jonas Rahlf via Gcc <gcc@gcc.gnu.org> wrote:
>
> As a firmware developer I would appreciate a warning option about padding
> bytes, but only for such cases where you can reduce the number of padding
> bytes by rearranging the fields.
>
> The current -Wpadded warns about all padding bytes, which is annoying.
>
> The concept sounds simple: you rearrange all fields from large to small and
> check if the size changed.
>
> The goal is to more easily optimize RAM/flash in space constrained systems.
>
> Jonas

That sounds like bug 52981: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52981

Reply via email to