[PATCH 1/3] struct packed: Use gcc_struct on Windows
Eli Zaretskii
eliz@gnu.org
Thu Jul 21 16:03:14 GMT 2022
> From: Pedro Alves <pedro@palves.net>
> Date: Thu, 21 Jul 2022 16:21:30 +0100
>
> The issue is that mingw gcc defaults to "-mms-bitfields", which
> affects how bitfields are laid out. We can however tell GCC that we
> want the regular GCC layout instead using attribute gcc_struct.
Is that a good idea? It means the code emitted by GCC for this source
file will be incompatible with any other library compiled with MinGW
that GDB uses. So we are risking ABI incompatibilities here. Right?
Can you tell why we must have the regular GCC layout of bitfields
here?
Thanks.
More information about the Gdb-patches
mailing list