devel/gdb: fix build with clang 16
Clang 16 has a new error about integer values being outside the valid
range for enum types, which shows up when building gdb:
In file included from /wrkdirs/usr/ports/devel/gdb/work-py39/gdb-13.1/gdb/x86-fbsd-nat.c:20:
In file included from /wrkdirs/usr/ports/devel/gdb/work-py39/gdb-13.1/gdb/defs.h:65:
/wrkdirs/usr/ports/devel/gdb/work-py39/gdb-13.1/gdb/../gdbsupport/enum-flags.h:95:52: error: integer value -1 is outside the valid range of values [0, 15] for this enumeration type [-Wenum-constexpr-conversion]
integer_for_size<sizeof (T), static_cast<bool>(T (-1) < T (0))>::type
^
In file included from /wrkdirs/usr/ports/devel/gdb/work-py39/gdb-13.1/gdb/x86-bsd-nat.c:20:
In file included from /wrkdirs/usr/ports/devel/gdb/work-py39/gdb-13.1/gdb/defs.h:65:
/wrkdirs/usr/ports/devel/gdb/work-py39/gdb-13.1/gdb/../gdbsupport/enum-flags.h:95:52: error: integer value -1 is outside the valid range of values [0, 15] for this enumeration type [-Wenum-constexpr-conversion]
integer_for_size<sizeof (T), static_cast<bool>(T (-1) < T (0))>::type
^
In file included from /wrkdirs/usr/ports/devel/gdb/work-py39/gdb-13.1/gdb/x86-nat.c:20:
In file included from /wrkdirs/usr/ports/devel/gdb/work-py39/gdb-13.1/gdb/defs.h:65:
/wrkdirs/usr/ports/devel/gdb/work-py39/gdb-13.1/gdb/../gdbsupport/enum-flags.h:95:52: error: integer value -1 is outside the valid range of values [0, 15] for this enumeration type [-Wenum-constexpr-conversion]
integer_for_size<sizeof (T), static_cast<bool>(T (-1) < T (0))>::type
^
In file included from /wrkdirs/usr/ports/devel/gdb/work-py39/gdb-13.1/gdb/windows-tdep.c:18:
In file included from /wrkdirs/usr/ports/devel/gdb/work-py39/gdb-13.1/gdb/defs.h:65:
/wrkdirs/usr/ports/devel/gdb/work-py39/gdb-13.1/gdb/../gdbsupport/enum-flags.h:95:52: error: integer value -1 is outside the valid range of values [0, 15] for this enumeration type [-Wenum-constexpr-conversion]
integer_for_size<sizeof (T), static_cast<bool>(T (-1) < T (0))>::type
^Upstream already noticed this, and committed
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ae61525fcf4 as
a workaround, so add this as an additional patch, until gdb 13.2 is
released.
PR: 271045
Approved by: maintainer timeout (2 weeks)
MFH: 2023Q2