The VMS version of GNAT fully implements all the pragmas and attributes provided by HP Ada 83, as well as providing the standard HP Ada 83 libraries, including Starlet. In addition, data layouts and parameter passing conventions are highly compatible. This means that porting existing HP 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 HP 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 HP Ada 83, the point of this definition is to deal with a call like:
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 HP 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 HP publication entitled HP Ada, Technical Overview and Comparison on HP Platforms.
For GNAT running on other than VMS systems, all the HP Ada 83 pragmas and attributes are recognized, although only a subset of them can sensibly be implemented. The description of pragmas in the GNAT Reference Manual indicates whether or not they are applicable to non-VMS systems.