On 10/20/23 09:53, Ken Matsui wrote:
Since RID_MAX soon reaches 255 and all built-in traits are used approximately
once in a C++ translation unit, this patch removes all RID values for built-in

These two lines are too long; please wrap at 75 columns so they don't go over 80 when git log adds 4 spaces at the beginning.

traits and uses the identifier node to look up the specific trait.  Rather
than holding traits as keywords, we set all trait identifiers as cik_trait,
which is a new cp_identifier_kind.  As cik_reserved_for_udlit was unused and
cp_identifier_kind is 3 bits, we replaced the unused field with the new
cik_trait.  Also, the later patch handles a subsequent token to the built-in
identifier so that we accept the use of non-function-like built-in trait
identifiers.

  /* True if this identifier is for any operator name (including
-   conversions).  Value 4, 5, 6 or 7.  */
+   conversions).  Value 4, 5, or 6.  */
  #define IDENTIFIER_ANY_OP_P(NODE)             \
-  (IDENTIFIER_KIND_BIT_2 (NODE))
+  (IDENTIFIER_KIND_BIT_2 (NODE) && !IDENTIFIER_TRAIT_P (NODE))
...
+/* True if this identifier is the name of a built-in trait.  */
+#define IDENTIFIER_TRAIT_P(NODE)               \
+  (IDENTIFIER_KIND_BIT_0 (NODE)                        \
+   && IDENTIFIER_KIND_BIT_1 (NODE)             \
+   && IDENTIFIER_KIND_BIT_2 (NODE))

The other macros use &, not &&; we might as well stay consistent with that pattern.

Jason

Reply via email to