Re: [PATCH 1/3] struct packed: Use gcc_struct on Windows

Pedro Alves
2022-07-21T18:18:36Z

On 2022-07-21 6:40 p.m., Eli Zaretskii wrote:
>> Cc: gdb-patches@sourceware.org
>> From: Pedro Alves <pedro@palves.net>

>> Because without it the struct won't really be packed.
>
> Can you tell why is that necessary?

Somehow I missed this question. It is necessary because that's the whole
point of "struct packed". To wrap some other type and pack it. We use it
in some size-sensitive structures, to make them are as small as possible.
This is described in the gdbsupport/packed.h header.