Previous: Representation Clauses, Up: Compatibility and Porting Guide
The VMS version of GNAT fully implements all the pragmas and attributes provided by DEC Ada 83, as well as providing the standard DEC Ada 83 libraries, including Starlet. In addition, data layouts and parameter passing conventions are highly compatible. This means that porting existing DEC Ada 83 code to GNAT in VMS systems should be easier than most other porting efforts. The following are some of the most significant differences between GNAT and DEC Ada 83.
TO_ADDRESS (INTEGER) TO_ADDRESS (UNSIGNED_LONGWORD) TO_ADDRESS (universal_integer)
The version of TO_ADDRESS taking a universal integer argument is in fact an extension to Ada 83 not strictly compatible with the reference manual. In GNAT, we are constrained to be exactly compatible with the standard, and this means we cannot provide this capability. In DEC Ada 83, the point of this definition is to deal with a call like:
TO_ADDRESS (16#12777#);
Normally, according to the Ada 83 standard, one would expect this to be ambiguous, since it matches both the INTEGER and UNSIGNED_LONGWORD forms of TO_ADDRESS. However, in DEC Ada 83, there is no ambiguity, since the definition using universal_integer takes precedence.
In GNAT, since the version with universal_integer cannot be supplied, it is not possible to be 100% compatible. Since there are many programs using numeric constants for the argument to TO_ADDRESS, the decision in GNAT was to change the name of the function in the UNSIGNED_LONGWORD case, so the declarations provided in the GNAT version of AUX_Dec are:
function To_Address (X : Integer) return Address; pragma Pure_Function (To_Address); function To_Address_Long (X : Unsigned_Longword) return Address; pragma Pure_Function (To_Address_Long);
This means that programs using TO_ADDRESS for UNSIGNED_LONGWORD must
change the name to TO_ADDRESS_LONG.
For full details on these and other less significant compatibility issues, see appendix E of the Digital publication entitled DEC Ada, Technical Overview and Comparison on DIGITAL Platforms.
For GNAT running on other than VMS systems, all the DEC Ada 83 pragmas and attributes are recognized, although only a subset of them can sensibly be implemented. The description of pragmas in this reference manual indicates whether or not they are applicable to non-VMS systems.