From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id ECBF23856965 for ; Tue, 15 Aug 2023 18:13:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ECBF23856965 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-out2.suse.de (Postfix) with ESMTPS id B37B01F8C2 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-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NY2pJe7FclYkVX62dXXLYNQcOM5ImGzr/yP37TXf8AA=; b=ZJ4SC6vsnM7H5v+1tQP+b6CWTXZfN0ZNf/X15hatV+lNzdxN+oDekbMflgj4mGjsLY+s7S KfXBEUh6zipk1Xsgem9mqZGlhd2aXTiBytnKSuvfTTCMr4HnP3qWrAkwuqurBr7eeW3dfH 6f3Sns8PPQcEVmDPam8BFsQQ1C2Eys8= 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-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NY2pJe7FclYkVX62dXXLYNQcOM5ImGzr/yP37TXf8AA=; b=7H3ONhpcKd2mLRw0IYMd2cEj6EHXFfkUVDE/1h2H4XRJzm8Urcj7mA/P1yg0fegWzBsGu3 59zyj/vZTns5ZACQ== 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 A0C581353E 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 ZOgqJlDA22RuQAAAMHmgww (envelope-from ) for ; Tue, 15 Aug 2023 18:13:36 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 0/7] [gdb/build] Fix -std=c++20 issues Date: Tue, 15 Aug 2023 20:13:02 +0200 Message-Id: <20230815181309.8595-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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: I tried building gdb using -std=c++20, an ran into a few issues. This series contains fixes for most of them. I ran into a problem in a libguile header file, I've worked around that by disabling guile support. I'll file a PR about this. The final patch, "[gdb/build, c++20] Handle deprecated std::allocator::construct", exposes two problems where a gdb::byte_vector is returned and consequently copied. I have fix for one of those, patch "[gdb/build] Return reference in target_read_auxv". But the other one, in remote_target::thread_info_to_thread_handle remains unfixed: ... gdb::byte_vector remote_target::thread_info_to_thread_handle (struct thread_info *tp) { remote_thread_info *priv = get_remote_thread_info (tp); return priv->thread_handle; } ... I wrote a patch for this, which allowed me to finish the build with -std=c++20, but it causes a regression in gdb.python/py-thrhandle.exp, so it's not included in this series. Tested on x86_64-linux, with: - gcc 7.5.0 -std=c++11, and - gcc 12.3.0 -std=c++17. Build on x86_64-linux, with: - gcc 12.3.0 -std=c++20, which runs into the single error mentioned above. Tom de Vries (7): [gdb/build, c++20] Fix Wdeprecated-enum-enum-conversion [gdb/build, c++20] Stop using deprecated is_pod [gdb/build, c++20] Fix DISABLE_COPY_AND_ASSIGN use in ui_out_emit_type [gdb/build, c++20] Fix deprecated implicit capture of this [gdb/build, c++20] Fix invalid conversion in test_symbols [gdb/build] Return reference in target_read_auxv [gdb/build, c++20] Handle deprecated std::allocator::construct gdb/ada-lang.c | 2 +- gdb/arm-fbsd-tdep.c | 2 +- gdb/auxv.c | 6 +++--- gdb/auxv.h | 2 +- gdb/dwarf2/read.c | 2 +- gdb/ravenscar-thread.c | 2 +- gdb/remote.c | 14 +++++++++----- gdb/rs6000-tdep.c | 3 ++- gdb/ui-out.h | 2 +- gdb/unittests/ptid-selftests.c | 4 +++- gdbsupport/common-exceptions.h | 4 +++- gdbsupport/default-init-alloc.h | 13 ++++++++++++- gdbsupport/poison.h | 2 +- 13 files changed, 39 insertions(+), 19 deletions(-) base-commit: 2a3f442df9e9a71f9e3c4c5999a2c53bf93e488d -- 2.35.3