From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.freebsd.org (mx2.freebsd.org [96.47.72.81]) by sourceware.org (Postfix) with ESMTPS id 7D33A3858D1E for ; Tue, 30 Apr 2024 16:33:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7D33A3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=FreeBSD.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7D33A3858D1E Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=96.47.72.81 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1714494805; cv=pass; b=tbf2uRn0QQ+iK4YzLhAXN0qy0iBK7UpSd2+bZBbVosbjg6CS8zNdXAJLaDSexoiI4uZm8+IcQPbe//VqV71n4ChQDEzWdnbyR6vGJMi6tfSGS/8PFNStiyTyGlw7AWSwmg2roew02eMYfLk2vvEWfFheKePmqruciG+tWKOikdQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1714494805; c=relaxed/simple; bh=3lEm679YkygZSV4frQxSMNYlXA9ZQKTJYXIksjDxsxg=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=apIDxdQCkd0m9cr/fCshBZGo0ihIBXrGFlTnAoGtSCxOvweAsJyNs/7NmkjG4EjlHo0Fr6W7cPkCdGc2z4Nriwi/XYIHxVTZqzzs9ZMb5xdGZL/F6fgf8eIzjyXGSFG3gC/tr0xO+o5KBefBVHbGarMPW4O/ubFbCJUVMcG8Qfs= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits)) (Client CN "mx1.freebsd.org", Issuer "R3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 4VTQjl1xX1z4PDg; Tue, 30 Apr 2024 16:33:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VTQjl0lPQz4sk6; Tue, 30 Apr 2024 16:33:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714494795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b5n4rBhH41T5JVTnjZQn3rSJtz1EEtJvCRnQnBvyQY0=; b=rDQ28tEZsScxsop+rxAUVGEgKDOHu7ngpIEpvj0atSZSMARc8nlTImHiQJ+8HZZ2hJ1nZf 9LO27KQXmzBRce+OiwmeVX3ZybuROlecHtZw1fEOizYhJeQZq77tVIrRx/eD75cvehSYG6 OBakyMM0nxtBZZIxBV4F99u8ualXJQ1e+BHPi5mGqeH9ukw9zPwt2NRaMK9qCGsqexCKav v9/YVnN57q9Xl8qRFR4FsDVmU3AlC5BMobBWPUsukE2OGQ8Flsvh1quLw3C3y6BhJBQpyl kXdHorhVY0yFZ9fmXop5PHg+BKmsF3xpJSpJyAECvim0yfIpOJWxAJHC57jmAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714494795; a=rsa-sha256; cv=none; b=GrutkhDhWEG37QeknBm3eoFqD5qwX+uoGOZgLjz66TT9IS/oir/fjLHtukvK4KlxiaDXhd /XSkHdLAoCwg0keWzzrK7eJ0isAd6WJJnBE6mLTxLQFLAZy3a7zyOz9nmv+3U2sWOnysfk PHTCjDpIedxdbknvnqPCuhLdBhkGMDIC1Fr+RxwPcc4eWXu4qz2SrMPWm8ZdwwsGyODH8A 7xOwBgk3ibGxJL6QqO/fUtu9X7vteSHq3B5koDHzHxXMlV2WMUJXbUJ0mXhLL8l/c4TTvT 3g03QFA1eK7kfdCfmAljtUgtKF7eC/EMJt/QL+/wO97tKyY+TvFC2m181qWW+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714494795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b5n4rBhH41T5JVTnjZQn3rSJtz1EEtJvCRnQnBvyQY0=; b=xSCprL0Y730ixcaUVvvlX2h2kDxCoKy6DMQG8hHLh4Uod8eCQmIiY7lSllkWsHMdcIPU06 ooUqIMUiRZfCeHBWTx+3IRFEN9okrECHBktVXsE1pSl2nIHStlaKlrgnt1Sl1UN3nkeZlg wJc3dz8enL6TdpQA7AoTGWPy+3gmr1iDMHBSAx4IDN3C2id4c5hIYJS1RPLBbuVyRffPP0 uqNohW/3yt2SMUXVFcvs9qBiOstNWsy+kRojeGaCz2+yWUsl6NFB+qJsak9PFY3AG+DTiK uepRZjUAdA0c3m5Jjbx2/lRltSSKqeobImBKBlMsh+P2p8iSDyBJj+tYos+g0g== Received: from [IPV6:2601:644:937f:4c50:4f5:7fc4:6856:aba3] (unknown [IPv6:2601:644:937f:4c50:4f5:7fc4:6856:aba3]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VTQjk5d8bz1K45; Tue, 30 Apr 2024 16:33:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <8f9c8199-6605-40f3-942f-d86758d10d79@FreeBSD.org> Date: Tue, 30 Apr 2024 09:33:13 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 08/10] Implement C++14 numeric separators Content-Language: en-US To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20240421-canon-fixes-v1-0-4dc4791d270d@tromey.com> <20240421-canon-fixes-v1-8-4dc4791d270d@tromey.com> <58c5e3fb-5768-4553-b61f-9a9b2616749e@FreeBSD.org> <87v846cu9i.fsf@tromey.com> From: John Baldwin In-Reply-To: <87v846cu9i.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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: On 4/24/24 2:42 PM, Tom Tromey wrote: >>>>>> "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. Ok, I think your current patch is fine then. Approved-By: John Baldwin -- John Baldwin