]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
struct packed: add fallback byte array implementation, use gcc_struct on Windows... users/palves/packed
authorPedro Alves <pedro@palves.net>
Mon, 18 Jul 2022 23:26:33 +0000 (00:26 +0100)
committerPedro Alves <pedro@palves.net>
Tue, 19 Jul 2022 14:44:07 +0000 (15:44 +0100)
commit73a029bd6037c59d10ab39518ad35d76292be54a
tree9f9864a9d103193b202d1f4e6ec9aeb63dd275ef
parent6994a75776b3a40e9a7435be8e6c5518c18bd391
struct packed: add fallback byte array implementation, use gcc_struct on Windows, unit tests

https://sourceware.org/bugzilla/show_bug.cgi?id=29373

- Windows hosts need attribute gcc_struct.

- attribute gcc_struct seemingly doesn't work with Clang, so add a
  fallback standard-conforming implementation based on arrays.

- add unit tests to make sure both implementations behave the same
  way.

- add more relational operators while at it.

Change-Id: I023315ee03622c59c397bf4affc0b68179c32374
gdb/Makefile.in
gdb/unittests/packed-selftests.c [new file with mode: 0644]
gdbsupport/packed.h