From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x92f.google.com (mail-ua1-x92f.google.com [IPv6:2607:f8b0:4864:20::92f]) by sourceware.org (Postfix) with ESMTPS id B03473858D39 for ; Tue, 19 Sep 2023 23:05:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B03473858D39 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-x92f.google.com with SMTP id a1e0cc1a2514c-7a50bd29064so2005868241.3 for ; Tue, 19 Sep 2023 16:05:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.washington.edu; s=goo201206; t=1695164744; x=1695769544; 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=U2WWTDMdtCBeWLU6749tx4jy36ix3P0ZcQY28KvSGnw=; b=BSqz9GDcqZI98+eQA2Eo3crSoLhGhX+/Dt9Xus0ApfST6ZVxu6XfHdHhSbvYgnwjGz ACsnjpQP4pSFhjAEMGDxGo2GsRhdPthWmuusbZX5zpE8gwREK/ly6zx1VtOG4IqDyQFd OtkDMJNxda9VPrJ48TLHjiivSmyp6sGnBBUYE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695164744; x=1695769544; 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=U2WWTDMdtCBeWLU6749tx4jy36ix3P0ZcQY28KvSGnw=; b=QhdkN1ge8cRwWCpIdCPVcjxf8YBFytw5VjYoU/eccUqh03sj0P2upTxXgvWteWbb6g 53XnDMFF9T+/NW3XFjv0a33phKD8gi6dT6ryvLkBJVSJbRRxfH+4Pc5feWqvMyStAxyv ksHFLOUTGOLWbdPEjl5ZjPLH2yxTRENwd3qFa7ELb4nlfu/XodswJETV1mYsZlH884dX YyYi1J3EYm007d8Ca40GSMekKH5ohhveOd6Oa1cZ6Lv8QipmTqxeZrIDdJUAiKSqXuBC yh88btqtPl6cvUD9D3YFFkGskSbY4ET8vEEtnXhjGasHQr+UabdrDbfhDwxV5rAmVsHY oLPw== X-Gm-Message-State: AOJu0Ywki+6xxXoX7c8vBi74iaYEfQwQmJlB03KNWrZKIkqsKk7Qp067 x0B6lFtwecB4jB1y2QMkVeYfAR4Lr0DosDia2EdjCw== X-Google-Smtp-Source: AGHT+IHDhlcobCTN2u0nOZb9E4LFNpmy8O6hl/VzEIG+ojm273owvD2jZ13egIK8qGkgrelImueHNp753EbOvSul0xI= X-Received: by 2002:a1f:c806:0:b0:496:1f95:209a with SMTP id y6-20020a1fc806000000b004961f95209amr1044174vkf.15.1695164743902; Tue, 19 Sep 2023 16:05:43 -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: <86d37ba9-e651-93a9-eb55-18a2221a4c44@redhat.com> From: Ken Matsui Date: Tue, 19 Sep 2023 16:05:07 -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=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=unavailable 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 Tue, Sep 19, 2023 at 9:59=E2=80=AFAM Jason Merrill wr= ote: > > 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 ev= ery > > 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? > Jason >