From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id JMwNGvU2fWob2iEAWB0awg (envelope-from ) for ; Wed, 12 Aug 2026 23:16:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1786590965; bh=zuwBPcIY2F5KSrTxYDugZarINyCv7rtTuK2NeA6uacc=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=lFgKDI3JKoCYhWgHtli5Xk8i/D20v99P/pR3jQBTuYSx+Mzzna/ObLeCITey5035e 5x9uikgj3KE5ib0vMWcd39vdlq05sSnmWRm8F9lRyn5Jlh/NCccxoZbDrauxWGczzE kmSK8+iKOsyuUMD97cSqS5Qg1gY6k1ni7/MKxv6Q= Received: by simark.ca (Postfix, from userid 112) id 5A1FD1E033; Wed, 12 Aug 2026 23:16:05 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=DdqYDvDw; dkim-atps=neutral Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B9C021E033 for ; Wed, 12 Aug 2026 23:16:04 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DDE264BA23FE for ; Thu, 13 Aug 2026 03:16:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DDE264BA23FE Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=DdqYDvDw Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id DD4154BA23C7 for ; Thu, 13 Aug 2026 03:15:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DD4154BA23C7 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DD4154BA23C7 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786590935; cv=none; b=CRkTaBpN8iKYoQlOyJs/nHM9SyHY4bfus/iSXJyLz/Lv9I5gseRalD3OjZqtMhnZQpfp6bgyoUUgEoeua9mpBQS10xljHgiONg3QxaIPCS8CMxTK3E6a0ZDEz/M/fxW2XgZUcpqdmAGAir5vBRYgD0A8TtbrVHDQQ++VeVVE52c= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786590935; c=relaxed/simple; bh=zuwBPcIY2F5KSrTxYDugZarINyCv7rtTuK2NeA6uacc=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=gisNNMjxq9J/YCIiQsBBD33J/+/zSSxCoiVRYZY1W+PSXhjNWSYitKefaPGiJ01gVUVRSq6u1yLBYyjznaBOzUzWWLKG2olWbMxAuMB04pT73ApfgA4knWWugfhTd1+AY4RnBuOrLsdTQadAIS29NpZMCtZOwBSc+tYdQ5CuiQs= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=DdqYDvDw DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DD4154BA23C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1786590934; bh=zuwBPcIY2F5KSrTxYDugZarINyCv7rtTuK2NeA6uacc=; h=Date:Subject:To:References:From:In-Reply-To:From; b=DdqYDvDwfpx3OVv00wV52BX88rxIvpQC71HI2UTBuV07tL6D9I5G7k40l8oT6VHAI glTAg9fT2L/RhtbXVLOhGnaV+WZQHIdqiRcTX69/uSq/Oy9ii6ADMWPST8pVnlRhAI glUKNg/zGDe/nylvxhjOhXUrtT/bowr9CZaQWKB4= Received: by simark.ca (Postfix) id EA9D01E033; Wed, 12 Aug 2026 23:15:33 -0400 (EDT) Message-ID: Date: Wed, 12 Aug 2026 23:15:33 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] [gdb/build] Fix cli/cli-style.c build error with C++20 To: Tom de Vries , gdb-patches@sourceware.org References: <20260813025445.237662-1-tdevries@suse.de> Content-Language: fr From: Simon Marchi In-Reply-To: <20260813025445.237662-1-tdevries@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 8/12/26 10:54 PM, Tom de Vries wrote: > PR build/34514 reports for a C++20 build: > ... > cli/cli-style.c:457:37: error: conversion from ‘const char8_t [8]’ to \ > non-scalar type ‘std::string’ {aka ‘std::__cxx11::basic_string’} \ > requested > 457 | static std::string warning_prefix = u8"\u26A0\uFE0F "; > | ^~~~~~~~~~~~~~~~~ > ... > > The u8 literal is char[] until C++20, but char8_t[] since C++20. > > Fix this by using a reinterpret_cast. > > Tested by rebuilding using GCC 15.3.0, with and without -std=c++20. > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34514 Seems fine to me, I don't see a better way around it, other than moving back to having the emoji in the code. Approved-By: Simon Marchi Simon