From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 606D23857728 for ; Wed, 27 Sep 2023 13:57:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 606D23857728 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695823058; 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: in-reply-to:in-reply-to:references:references; bh=bH5HfgN+i3T2HopciyA3KPGMwSsw8SI5oUYzGHRYL7U=; b=WXT/6BD8SouBspDzXQKvl0gpH035R6XYX8K8zV9Z2eQjEm8ryFnopoBxtbr68PZhXxCsk8 f7S6DLMyI4xPKuZRKoFp9+QYoHILuEgGeOcAZqJnAORmJXuEJ/bugJxxKuoj4pFt3aIyDk zLuYEsnaGVFsaUNACVhxv+dIyjHzmtA= Received: from mail-il1-f197.google.com (mail-il1-f197.google.com [209.85.166.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-677-eSXBldWAMOKzme--J07g7g-1; Wed, 27 Sep 2023 09:57:36 -0400 X-MC-Unique: eSXBldWAMOKzme--J07g7g-1 Received: by mail-il1-f197.google.com with SMTP id e9e14a558f8ab-3514cebdbd5so67555105ab.3 for ; Wed, 27 Sep 2023 06:57:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695823055; x=1696427855; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bH5HfgN+i3T2HopciyA3KPGMwSsw8SI5oUYzGHRYL7U=; b=mHxNDCfTzd5MBUAj6IMeuU+GzZ/U2MlMIwpsGn2DurUqnTYu2OKnGuwSHDhyNwv7sq lnSgyeDe7PGkRzUWP3QmjgJeP51QuUrUjhZszYbxnGVx7t0KYZxlkcU8t39lMtx6NFRw u/eVeL3aamOruF9QQC9SX42hsI6zWthjnCmhuPCrszRcb+irw5E+8XoWY3G3aV8JgQRG 7Nlzf332vMg/fcqDrMJpnWS2yrhl+jG4ZEFcfPQ3HpsF3/DmIfvv6ifGJW6XWaqY/5gY BP523pce+v+tSZmJ2xi9b4xEhj+Fsd3grDzJMKuxQrel09qh6emcEqry/bAS+7NAYec5 Y42Q== X-Gm-Message-State: AOJu0YwwsPs1k+C1mDELOPI1pZso/RCt9cLJGnqjlipL6dhooGvV18/Z vDqJpfw94T8YYBIrb7WqlmwEEUA95GSTshAEtWAkqw8AbcNDU3J/iRmvJmLzvh4kid5o/hQv9y5 QGbmJ09FLYO3Hdh1HtAGgJr+KxdKHups= X-Received: by 2002:a05:6e02:1ba1:b0:350:f352:4853 with SMTP id n1-20020a056e021ba100b00350f3524853mr2411240ili.25.1695823055479; Wed, 27 Sep 2023 06:57:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF/F8gkwKjr/dwt57XGH2GA30nfhoaKdzYARJb+4wG7gQLT7xH4gYTEZlyq/6Wr8a/pLSBzSlMJTNkF2nUj9bY= X-Received: by 2002:a05:6e02:1ba1:b0:350:f352:4853 with SMTP id n1-20020a056e021ba100b00350f3524853mr2411222ili.25.1695823055230; Wed, 27 Sep 2023 06:57:35 -0700 (PDT) MIME-Version: 1.0 References: <20230915023640.75216-17-kmatsui@gcc.gnu.org> <20230915235353.19378-1-kmatsui@gcc.gnu.org> <20230915235353.19378-17-kmatsui@gcc.gnu.org> <86d37ba9-e651-93a9-eb55-18a2221a4c44@redhat.com> In-Reply-To: From: Jason Merrill Date: Wed, 27 Sep 2023 09:57:24 -0400 Message-ID: Subject: Re: [PATCH v14 16/40] c, c++: Use 16 bits for all use of enum rid for more keyword space To: Ken Matsui Cc: Ken Matsui , gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org, Patrick Palka , "Joseph S. Myers" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="000000000000cf30b10606579258" X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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: --000000000000cf30b10606579258 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Sep 19, 2023 at 7:05=E2=80=AFPM Ken Matsui wrote: > On Tue, Sep 19, 2023 at 9:59=E2=80=AFAM Jason Merrill = wrote: > > > > On 9/15/23 19:51, Ken Matsui via Gcc-patches wrote: > > > Now that RID_MAX has reached 255, we need to update the bit sizes of > every > > > use of the enum rid from 8 to 16 to support more keywords. > > > > Sorry to bring this up so late, but this does raise the question of > > whether we actually want to use keyword space for all these traits that > > will probably be used approximately once in a C++ translation unit. I > > wonder if it would make sense to instead use e.g. RID_TRAIT for all of > > them and use gperf to look up the specific trait from the identifier? > > > > Thank you for your review. To use gperf, we might need to duplicate > the list of all traits defined in cp-trait.def. Modifying the traits > would require us to edit two files, but would it be acceptable? > I think the gperf input could be generated from the .def with a simple script? Jason --000000000000cf30b10606579258--