From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 01F85385B513 for ; Tue, 15 Aug 2023 18:13:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 01F85385B513 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 2C21F1FD64 for ; Tue, 15 Aug 2023 18:13:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1692123217; 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: in-reply-to:in-reply-to:references:references; bh=p2mEE6vPNjXZ3aPsY9OiUr3nRHGyJ8bSpU5s9DfiaXU=; b=2Wpj2VN6HZz+JNx+UV/DTz8FkBxiFMNHSpFnOVJdyElGBhhJgtrAMSOTdkRFNI/YnMX0Be wpuBpaCdDkESxLX/+NY9aY3k1bl6U0HjzZ7ij6kaXcGo9CuxjEq4er6/2+YB0ebOo/ej/T O3viWtLyn3r6H+V6A20OQJglXraZrIo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1692123217; 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: in-reply-to:in-reply-to:references:references; bh=p2mEE6vPNjXZ3aPsY9OiUr3nRHGyJ8bSpU5s9DfiaXU=; b=XQmXqbD9Ad/CboLIBFDb7Tr275ACnWlqbnLF9XoncpCpSFR+nGudIQ9ish5DDTKte8472U K5HEBlGKuJ6gSXBg== 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 1A5691353E for ; Tue, 15 Aug 2023 18:13:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id UFyFBVHA22RuQAAAMHmgww (envelope-from ) for ; Tue, 15 Aug 2023 18:13:37 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 5/7] [gdb/build, c++20] Fix invalid conversion in test_symbols Date: Tue, 15 Aug 2023 20:13:07 +0200 Message-Id: <20230815181309.8595-6-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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.2 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 -std=c++20, I run into: ... gdb/dwarf2/read.c:2709:3: error: invalid conversion from ‘const char8_t*’ to \ ‘const char*’ [-fpermissive] 2709 | u8"u8função", | ^~~~~~~~~~~~ | | | const char8_t* ... Fix this by making the conversion explicit. Tested on x86_64-linux. --- gdb/dwarf2/read.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index a64f82bd24a..5b13bbda31d 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -2706,7 +2706,7 @@ static const char *test_symbols[] = { /* A UTF-8 name with multi-byte sequences to make sure that cp-name-parser understands this as a single identifier ("função" is "function" in PT). */ - u8"u8função", + (const char *)u8"u8função", /* Test a symbol name that ends with a 0xff character, which is a valid character in non-UTF-8 source character sets (e.g. Latin1 -- 2.35.3