From: Tom de Vries Date: Thu, 17 Aug 2023 08:41:34 +0000 (+0200) Subject: [gdb/build, c++20] Stop using deprecated is_pod X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=84c9951ebd1da1aa5f0c5a614fe0b630dc603b3b;p=binutils-gdb.git [gdb/build, c++20] Stop using deprecated is_pod When building gdb with clang 15 and -std=c++20, I run into: ... gdbsupport/poison.h:52:11: error: 'is_pod' is deprecated: use \ is_standard_layout && is_trivial instead [-Werror,-Wdeprecated-declarations] std::is_pod> ^ ... Fix this by following the suggestion. Likewise in gdb/unittests/ptid-selftests.c. Tested on x86_64-linux. --- diff --git a/gdb/unittests/ptid-selftests.c b/gdb/unittests/ptid-selftests.c index 5af73b0da53..2713b619741 100644 --- a/gdb/unittests/ptid-selftests.c +++ b/gdb/unittests/ptid-selftests.c @@ -29,7 +29,9 @@ namespace ptid { This is a requirement for as long as we have ptids embedded in structures allocated with malloc. */ -static_assert (std::is_pod::value, "ptid_t is POD"); +static_assert (gdb::And, + std::is_trivial>::value, + "ptid_t is POD"); /* We want to avoid implicit conversion from int to ptid_t. */ diff --git a/gdbsupport/poison.h b/gdbsupport/poison.h index 956c3d856d8..63fccb30cb9 100644 --- a/gdbsupport/poison.h +++ b/gdbsupport/poison.h @@ -49,7 +49,7 @@ be a compile-time error. */ template struct IsMemsettable : gdb::Or, - std::is_pod> + gdb::And, std::is_trivial>> {}; template