Skip to content

Commit e9fb04e

Browse files
Quuxplusonetkoeppe
authored andcommitted
[dcl.enum] Enumerators don't have "initializers"
1 parent a700e3b commit e9fb04e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

source/declarations.tex

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7101,12 +7101,11 @@
71017101
An \grammarterm{enumerator-definition} with \tcode{=} gives the associated
71027102
\grammarterm{enumerator} the value indicated by the
71037103
\grammarterm{constant-expression}.
7104-
If the first \grammarterm{enumerator}
7105-
has no \grammarterm{initializer}, the value of the corresponding constant
7106-
is zero. An \grammarterm{enumerator-definition} without an
7107-
\grammarterm{initializer} gives the \grammarterm{enumerator} the value
7108-
obtained by increasing the value of the previous \grammarterm{enumerator}
7109-
by one.
7104+
An \grammarterm{enumerator-definition} without \tcode{=} gives the associated
7105+
\grammarterm{enumerator} the value zero
7106+
if it is the first \grammarterm{enumerator-definition},
7107+
and the value of the previous \grammarterm{enumerator}
7108+
increased by one otherwise.
71107109
\begin{example}
71117110
\begin{codeblock}
71127111
enum { a, b, c=0 };

0 commit comments

Comments
 (0)