Enumeration representation of Boolean type

The ARM states that “For nonboolean enumeration types, if the coding is not specified for the type, then for each value of the type, the internal code shall be equal to its position number.” (13.4(8)). However the as far as I can see, the ARM never specifies the representation of Boolean. Am I missing something or does Boolean just not have a defined representation?

From the Annotated Ada 2012 Language Reference:
Section 3.5.3

3.5.3 Boolean Types
Static Semantics
There is a predefined enumeration type named Boolean, [declared in the visible part of package
Standard]. It has the two enumeration literals False and True ordered with the relation False < True. Any
descendant of the predefined type Boolean is called a boolean type.
Implementation Note: An implementation is not required to support enumeration representation clauses on boolean
types that impose an unacceptable implementation burden. See 13.4, “Enumeration Representation Clauses”. However,
it is generally straightforward to support representations where False is zero and True is 2**n – 1 for some n.

Apologies for the messy formating.

AFAIK, GNAT uses by default 0 for False and 1 for True internally, BUT, you can change those values in order to harden or modify the actual representation during compilation time! :smiley:

You can look at system.ads. In gnat studio you can bring it up under help Ada system if I recall correctly. You shall see it is indeed represented as 0 and 1 along with a size.