From 5391057a05c569fb1384df698208151dc5f8de38 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Fri, 30 Oct 2026 15:03:48 +0800 Subject: [PATCH] [dcl.enum] Fix remaining misuses of "initializer" It is incorrect to say "initializer of an enumerator", so we should chose other words to specify the rules. Previously, e9fb04e1c1e67bfb07bf3c61145b9d63a0f0adcf fixed some but not all misuses. --- source/declarations.tex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/declarations.tex b/source/declarations.tex index 1c896f425c..fbf60e4e59 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -8175,15 +8175,15 @@ follows: \begin{itemize} -\item If an -initializer is specified for an enumerator, the -\grammarterm{constant-expression} shall be an integral constant +\item If the +\grammarterm{enumerator-definition} of an enumerator contains \tcode{=}, the +\grammarterm{constant-expression} following \grammarterm{enumerator} \tcode{=} shall be an integral constant expression\iref{expr.const.const}. If the expression has unscoped enumeration type, the enumerator has the underlying type of that enumeration type, otherwise it has the same type as the expression. -\item If no initializer is specified for the -first enumerator, its type is an unspecified signed integral type. +\item If the \grammarterm{enumerator-definition} of the +first enumerator does not contain \tcode{=}, its type is an unspecified signed integral type. \item Otherwise the type of the enumerator is the same as that of the