enum_list Production

Definition

enum_list : identifier = exp
          | identifier

Purpose

An enum defines a possible value for the enumeration. It may have an initializer or not. There is no rule preventing two enumeration values from having the same value. However, they will be indistinguishable during execution.

Semantics

Each identifier may not coexist with any other declaration in the current scope.