]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
opcodes: fix -std=gnu23 compatibility wrt static_assert
authorSam James <sam@gentoo.org>
Sat, 16 Nov 2024 05:03:52 +0000 (05:03 +0000)
committerSam James <sam@gentoo.org>
Mon, 18 Nov 2024 03:09:15 +0000 (03:09 +0000)
commit8ebe62f3f0d27806b1bf69f301f5e188b4acd2b4
tree6cbda27c5e17ea86014cf85b8f7ed5734fe51dc0
parent931e4f9b09512bb9012204bb2e4060ab6d9b9b46
opcodes: fix -std=gnu23 compatibility wrt static_assert

static_assert is declared in C23 so we can't reuse that identifier:
* Define our own static_assert conditionally;

* Rename "static assert" hacks to _N as we do already in some places
  to avoid a conflict.

ChangeLog:
PR ld/32372

        * i386-gen.c (static_assert): Define conditionally.
        * mips-formats.h (MAPPED_INT): Rename identifier.
        (MAPPED_REG): Rename identifier.
        (OPTIONAL_MAPPED_REG): Rename identifier.
        * s390-opc.c (static_assert): Define conditionally.
opcodes/i386-gen.c
opcodes/mips-formats.h
opcodes/s390-opc.c