From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta034.useast.a.cloudfilter.net (omta034.useast.a.cloudfilter.net [44.202.169.33]) by sourceware.org (Postfix) with ESMTPS id 3CDDF384640E for ; Wed, 24 Apr 2024 21:42:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3CDDF384640E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3CDDF384640E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713994956; cv=none; b=Rd9RC5fpiyMnsJjhw57EJ5uDSiUY0kUOcZ2k+I1hDxurjaEi/0cpmp4TNU15IYXneeO9L/bgev6Nh0EC893t60qTgqL2t0eakzAitZCOIMUgXLh86Vn3QPUMAbOWY9/JHdV2eCPHAKHzGMLAiITiM2Fgf85k4f93WB7lTr/z/OM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713994956; c=relaxed/simple; bh=5ZzbrWEYee4raO7hmyvcJRlW+00awhgHMwOfpxuC/8s=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=tL/jTGww+QY8PNSAKzE1rH2daGLXZ59pU61IQHDS0wBP01D4e7FSwEhSfNBbD3UuQw6Ua2prSyxtfC8edes9nbRJhHMqh1Qri+kDOwXjcyfTbMj49fNchNjGwXq1cPtK6Z58pPCcEN41cZtNT8wV9gs90tB06whBxiSoG595bnY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5002a.ext.cloudfilter.net ([10.0.29.215]) by cmsmtp with ESMTPS id zIYsr1nGhs4yTzkNvrsrl5; Wed, 24 Apr 2024 21:42:35 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id zkNurUMDdr1IfzkNursBdq; Wed, 24 Apr 2024 21:42:34 +0000 X-Authority-Analysis: v=2.4 cv=BawT0at2 c=1 sm=1 tr=0 ts=66297cca a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=raytVjVEu-sA:10 a=Qbun_eYptAEA:10 a=6I5d2MoRAAAA:8 a=yHgJMydfYzJgo2N2VF4A:9 a=IjZwj45LgO3ly-622nXo:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=rEZyThd+1McGTaQVNCWPb00OPFtttU3/Uz7Dvm4AnYI=; b=xhIaCO6yodxd1Ld+Gix++PRLkc LgnyQ4OVg3Z0fU3Y8+0U4oetzx8POa6USmh85KOXGEugfLpvqIfoKJMdHUiVhonuzrhBIGv5eaEgG ZKd6Ha/sFoe2gjYRmQ4y4rQUI; Received: from 97-122-86-252.hlrn.qwest.net ([97.122.86.252]:39912 helo=prentzel) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rzkNt-001Pmo-2j; Wed, 24 Apr 2024 15:42:33 -0600 From: Tom Tromey To: John Baldwin Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH 08/10] Implement C++14 numeric separators In-Reply-To: <58c5e3fb-5768-4553-b61f-9a9b2616749e@FreeBSD.org> (John Baldwin's message of "Mon, 22 Apr 2024 10:29:14 -0700") References: <20240421-canon-fixes-v1-0-4dc4791d270d@tromey.com> <20240421-canon-fixes-v1-8-4dc4791d270d@tromey.com> <58c5e3fb-5768-4553-b61f-9a9b2616749e@FreeBSD.org> X-Attribution: Tom Date: Wed, 24 Apr 2024 15:42:33 -0600 Message-ID: <87v846cu9i.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.86.252 X-Source-L: No X-Exim-ID: 1rzkNt-001Pmo-2j X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-86-252.hlrn.qwest.net (prentzel) [97.122.86.252]:39912 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfC0yzHhpUAG0Ha/fOsBxqfw63O0ecuGY9m7OJot7D2oBdTQgy5dxLGDNoif4DqpGocPfCt+sNueuEUF34hL2lkWgpTHB6GjJBuV6vfb1vwwGlUiSQQr8 3+PGsbrx6CmGvUAa2EBKQU50l7LC5DzjWingOqhg6CMDY6wUsu9NB/ZUVOW+7/rpnQ1/BfACMZLOfT/XztnRsJ8953Ym/PQyIo0= X-Spam-Status: No, score=-3015.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>>>> "John" == John Baldwin writes: >> For the name canonicalizer, there's at least one compiler that can >> emit constants with this form, see bug 30845. John> I guess this is the only separator allowed so far? Yeah. It was added in C++14. John> Longer term I John> do think it might be easier to understand the code if you always John> allocate a new string and copy valid characters into just using a John> 'continue' to skip characters you want to drop. Perhaps though John> this is a hot path where the extra allocation would be noticable? In c-exp.y, probably not. In cp-name-parser.y -- maybe. That code is run when demangling, and sometimes that means it is run quite a bit. John> I also wonder if there might be benefit in a commit prior to John> this that pulls out the shared code here into a single routine John> that these files share? (Or is that not quite as doable with John> yacc?) I tried that and it was pretty messy. It could be done but I just took an easier route out of laziness I guess. Tom