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.133.124]) by sourceware.org (Postfix) with ESMTPS id 4FFC73857B93 for ; Wed, 27 Sep 2023 13:57:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4FFC73857B93 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-110-8mXAHhibM3ueFntpyJoieg-1; Wed, 27 Sep 2023 09:57:36 -0400 X-MC-Unique: 8mXAHhibM3ueFntpyJoieg-1 Received: by mail-il1-f197.google.com with SMTP id e9e14a558f8ab-351351eb1dfso98252715ab.1 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=rLfQLpq1EA4+1Sjcgf2yTdz2ixewCvEOFovByhzKfl7SkYwgPAJTbyefnzltaJfwJs ELQNF5qb1+eqbVALVD3wRKXoBMxK+QFdZsy8JzFUNjq4gvIBbNhd7iauMt0DTzd1Su76 3k6VmNBwc1ebIC4vpBl2SUwuMLD3NO2mnGIscydP3ui9iqJYQ97ONIJuCMoLvaYcT5ut qAyg7lyPOkGIZBncvScM6oeKA0aSVoUWw9aQXT+gS903s1eNjtaXgA6JST3OS+GeBJTT B7Wsk3QkNzErvsw2g7HRRtU+YN1iDTRyZXqoAiYX6CEoTg1pGERir1VHRHxUPI8BIg+B k3Mg== X-Gm-Message-State: AOJu0YwevR4fQAS7ACOkI6jySdurqBJQznqHtPTe0jFqe2dFiF2q9Z3i h4JbPgiVoppdRnveVe9J/6l7wFTsz3mNBRe7cCYVn7QY+Swh3wVQcY1UvKCMgebccvzTq6heBaX EbIuW8vom/txoOs1DRLRiSB+1KZHF++vZXQ== X-Received: by 2002:a05:6e02:1ba1:b0:350:f352:4853 with SMTP id n1-20020a056e021ba100b00350f3524853mr2411238ili.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_H3,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--