From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id B58263856DD0 for ; Tue, 15 Aug 2023 18:13:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B58263856DD0 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id DFFA121910 for ; Tue, 15 Aug 2023 18:13:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1692123216; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KR7pNhxDXBL2AZs7IRld3Go8D/cUqfwweAbyl3g8MIw=; b=ehoJOxjk/3/tMHWKQx0Fg6qziDs7hw3hIHZPiU6T1WX1tHqlgTNKwB90ndOvhnmfTGuJtY fzvcW7zeWTJC2/8u4Nt5e3gTfjDnzDUo+8BlX8CIksv9R7IGYKL4iTXiA7HG2/S7Jup/zT BVtbwqz46Kr7PIBrpm5NlsNpV22d900= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1692123216; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KR7pNhxDXBL2AZs7IRld3Go8D/cUqfwweAbyl3g8MIw=; b=JGlk0OEHKe0d9DtdCGyn6UfZbxFv4PXeFoDKDPCBskIDSnvOKzfZ/NkKd6ceFtLhBN2d6Z PkDnzvYzELdh64BQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id CDDF51353E for ; Tue, 15 Aug 2023 18:13:36 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id oM5GMVDA22RuQAAAMHmgww (envelope-from ) for ; Tue, 15 Aug 2023 18:13:36 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 2/7] [gdb/build, c++20] Stop using deprecated is_pod Date: Tue, 15 Aug 2023 20:13:04 +0200 Message-Id: <20230815181309.8595-3-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230815181309.8595-1-tdevries@suse.de> References: <20230815181309.8595-1-tdevries@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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. --- gdb/unittests/ptid-selftests.c | 4 +++- gdbsupport/poison.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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