* Richard Kenner: > No, the language (or, more precisely, GNAT) defines them as 0 and > 2**size - 1. Otherwise the 'Valid attribute doesn't work. Necessary > range checks will be optimized away, too. > > No, enumeration types are defined as having precisely the set of > values specifically listed.
This is simply not true for Ada. Look at the definition of the 'Valid attribute in the standard: 3. X'Valid Yields True if and only if the object denoted by X is normal and has a valid representation. The value of this attribute is of the predefined type Boolean. If your claim were true, 'Valid could never return False for enumeration types.