- Ada 2012
- Ada 2005 / 95 / 83
- Embedded Development
- Formal Methods
- Open Source
- Safety-Critical Development
- Static Analysis
Aug 30th, 2005
AAMP Text_IO calls _PUT_CHAR and _GET_CHAR
On the AAMP target only, the low-level I/O routines for putting and getting single characters now make calls using the link names _PUT_CHAR and _GET_CHAR, which are symbolic names defined in template.lec. This allows developers to easily substitute environment-specific I/O routines.
Aug 21st, 2005
Better handling of membership tests
Using a membership test X in Y is a wrong way to test for having an invalid representation (here Y is the subtype of X). The compiler can assume tha X is valid and elide the test. The proper way to do this is to use the 'Valid attribute. The compiler now recognizes such dubious membership tests and replaces them with appropriate 'Valid tests, generating warning messages.
Warning on dubious use of gnatbind -p
The use of the -p gnatbind switch makes sense only if at least some unirts in the partition were compiled with the dynamic elaboration model (-gnatE). A warning is now given if this switch is used and all units within the partition were compiled with the default static elaboration model.
Better messages for wrong categorization
A clearer more specific error message is now generated for the common cases of a pure unit attempting to with non-pure package, or a preelaborated unit attempting to with a non-preelaborated package.
Aug 14th, 2005
Two argument form of Float_Representation
A specific floating-point type name may appear as an optional second argument for pragma Float_Representation, in which case the pragma may appear within a declarative part and applies only to the named type. This feature has actually always been implemented, but until now, was not documented.
Warning on failure to short circuit
Warnings are now generated for some cases where it is pretty obvious that a non-short-circuited conditional form has been incorrectly used. For example in the expression "P=null or P.all=3", it is clear that the "or" here should be "or else".
Remove unnecessary run-time checks
The front end now removes some unnecessary access and zero divide checks, based on analysis of short-circuited forms. For example, the expression "N=0 or else 10/N=7" does not require a zero divide check.
Aug 5th, 2005
New gnatlink switches to create map files
Two new switches have been added for gnatlink on platforms that support the creation of map files, -M<map> to create a map file with name <map> and -M to create a mapping file with name <mainprog>.map.