diff options
author | Tom de Vries <tdevries@suse.de> | 2023-08-17 10:41:34 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-08-17 10:41:34 +0200 |
commit | 84c9951ebd1da1aa5f0c5a614fe0b630dc603b3b (patch) | |
tree | 0ced3e5df5099da5372ec0f5cd9496d3d98771f5 /gdb/unittests | |
parent | 24a601dd70a53fc87f33196774f8d883be31d2fe (diff) | |
download | gdb-84c9951ebd1da1aa5f0c5a614fe0b630dc603b3b.zip gdb-84c9951ebd1da1aa5f0c5a614fe0b630dc603b3b.tar.gz gdb-84c9951ebd1da1aa5f0c5a614fe0b630dc603b3b.tar.bz2 |
[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<timeval>' is deprecated: use \
is_standard_layout && is_trivial instead [-Werror,-Wdeprecated-declarations]
std::is_pod<T>>
^
...
Fix this by following the suggestion.
Likewise in gdb/unittests/ptid-selftests.c.
Tested on x86_64-linux.
Diffstat (limited to 'gdb/unittests')
-rw-r--r-- | gdb/unittests/ptid-selftests.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/unittests/ptid-selftests.c b/gdb/unittests/ptid-selftests.c index 5af73b0..2713b61 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<ptid_t>::value, "ptid_t is POD"); +static_assert (gdb::And<std::is_standard_layout<ptid_t>, + std::is_trivial<ptid_t>>::value, + "ptid_t is POD"); /* We want to avoid implicit conversion from int to ptid_t. */ |