From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x92d.google.com (mail-ua1-x92d.google.com [IPv6:2607:f8b0:4864:20::92d]) by sourceware.org (Postfix) with ESMTPS id 2DFD93858D20 for ; Mon, 9 Oct 2023 05:04:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2DFD93858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=cs.washington.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.washington.edu Received: by mail-ua1-x92d.google.com with SMTP id a1e0cc1a2514c-7aba0a76512so1243240241.2 for ; Sun, 08 Oct 2023 22:04:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.washington.edu; s=goo201206; t=1696827872; x=1697432672; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=QajOAhcJ6wDPLQxLgygSH2h5nK/itxVCcdhZUAMBWGk=; b=dalKZJu1x0kO4w4WTpuB6vBWype931kIRx2plFu5ekyz7bcHXiJKpqqTtI1FFoUkbm aoKGVaR+Wgv6Q/tg9nllhnoAiLJUHqStqrBTaQHabGspdxc27zIyc6c68dny45MjQjo5 BX0SITo3CQDRQkBjDXghTGfGZOSsXwo2WiD0E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696827872; x=1697432672; h=content-transfer-encoding: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=QajOAhcJ6wDPLQxLgygSH2h5nK/itxVCcdhZUAMBWGk=; b=Y4OuTanDexnLuNQMhF1K1hQkLrmhAWV4Qq6YYPyhU2SBvBKeHaYyfRo0DL6epICufG sjiI8i+x4zGIeWmQbXzaAXvWgYSSkkYlqDJjaBJi03r0kiGUCU0ukvz4umAKfbcWmIcb dPJkALMsMl88F2EqM7z1KhrmvNa7FwAOPv71/+7HBMB4sveUZBBdc/GbOj+7nJYz/Unu SH9sZR3LCBfAY9V9ovkFeOdh9+7ravo98jsP5CLBlRES/Sgd5MuhreZBf2KXwyGj4tXz 1GmaScLrS0dntWYUP6T9sIh6TA0IMQN44Gj0fe205Q3S2R8LOjxJeavMGRCnZkfUkDoB abEg== X-Gm-Message-State: AOJu0YzJUQJfLnotDcMoMNNd60dVfZIAjRNVAEda59fWUWbZMhMAsbyc 8munfpaXgIJz447UYvAjZjrmyPi1ONBMFCvKnmzYNQ== X-Google-Smtp-Source: AGHT+IG6N9wB4p7qeybh0KT9sb+gXDzv+VQ+xGkL9lZkudz02BdkuNcnl/KiBmbCsof1E1MrXYBHH660F+0PrTyVlbE= X-Received: by 2002:a05:6122:2004:b0:49d:611:a8cb with SMTP id l4-20020a056122200400b0049d0611a8cbmr13307782vkd.11.1696827872446; Sun, 08 Oct 2023 22:04:32 -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: Ken Matsui Date: Sun, 8 Oct 2023 22:03:56 -0700 Message-ID: Subject: Re: [PATCH v14 16/40] c, c++: Use 16 bits for all use of enum rid for more keyword space To: Jason Merrill Cc: Ken Matsui , gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org, Patrick Palka , "Joseph S. Myers" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,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 Wed, Sep 27, 2023 at 6:57=E2=80=AFAM Jason Merrill wr= ote: > > 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 tha= t >> > 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 sc= ript? > Thank you! Will do! > Jason