Declarations and types are supported as specified in the Ada standard except for tagged types (See RM Section 3.0), unconstrained types (RM Section 3.2), and the attributes 'Image and 'Value.
When the compile time options -Wuninitialized -O are used, the compiler will flag variables that may be uninitialized.
Enumeration types are supported as defined in the Ada 95 Reference Manual. Additional code is generated to support the attributes 'Pos, 'Val and 'Image.
The size of enumeration objects is the minimum required to accommodate all the values, and including any representations given in a representation clause. The compiler will select a size of 8, 16, 32 or 64 bits as appropriate.
Enumeration types may be packed to reduce wasted space in arrays of enumeration objects.
ERC32 Ada provides five predefined Integer types:
Short_Short_Integer
Short_Integer
Integer
Long_Integer
Long_Long_Integer
Table 1-1 gives the values of the attributes Size, First and Last for these types.
Table 1-1. Attributes of the Predefined Integer Types
| Type | Size | First | Last |
|---|---|---|---|
| Short_Short_Integer | 8 | -27 | 27-1 |
| Short_Integer | 16 | -215 | 215-1 |
| Integer | 32 | -231 | 231-1 |
| Long_Integer | 32 | -231 | 231-1 |
| Long_Long_Integer | 64 | -263 | 263-1 |
User-Defined Types. For a user-defined integer type, the compiler will automatically select the smallest predefined integer type as the base type. For example, given the following type definition:
type My_Integer is range -10 .. +10;
the compiler will use Short_Short_Integer as the base type, and My_Integer'Size will be 8 bits.
Modular Types. ERC32 Ada supports modular types up to 64 bits in size. Like the integer types, these are represented in 8, 16, 32 or 64 bits as appropriate. The following declarations are legal:
type word_8 is mod 256; type word_16 is mod 65536; type word_32 is mod 2**32; type word_64 is mod 2**64;
The standard Ada 95 operators for modular types are supported.
ERC32 Ada provides four predefined floating-point types:
Short_Float
Float
Long_Float
Long_Long_Float
The types Short_Float and Float are represented by the 32-bit single precision IEEE format; the types Long_Float and Long_Long_Float are represented by the 64-bit IEEE format. Note that the 80-bit extended precision format is not supported by the ERC32.
Table 1-2 gives the values of the attributes for the predefined floating-point types.
Table 1-2. Basic Attributes of Floating Point Types
| Attribute | Short_Float | Float | Long_Float | Long_Long_Float |
|---|---|---|---|---|
| Size | 32 | 32 | 64 | 64 |
| Digits | 6 | 6 | 15 | 15 |
| Machine_Radix | 2 | 2 | 2 | 2 |
| Machine_Mantissa | 23 | 23 | 52 | 52 |
| Machine_Emax | 128 | 128 | 1024 | 1024 |
| Machine_Emin | -125 | -125 | -1021 | -1021 |
| Machine_Rounds | False | False | False | False |
| Machine_Overflows | False | False | False | False |
ERC32 Ada supports fixed-point types up to 64 bits in size using 8, 16, 32 or 64 bits as appropriate. The value of 'Small may be either a power of two, or an arbitrary value given in a representation clause.