- Ada 2012
- Ada 2005 / 95 / 83
- Embedded Development
- Formal Methods
- Open Source
- Safety-Critical Development
- Static Analysis
AI-334 Overriding of abstract equality required
This AI clarifies that a nonlimited, nonabstract type extension that derives from a type with an abstract equality operation must override its own implicit equality operation (which is not inherited in this case, but is a predefined operation of the extension). This rule was already followed correctly by GNAT.
AI-260-02 Abstract formal subprograms
Formal subprograms can now be declared as abstract if they have a tagged formal parameter or tagged result. The actual for such a subprogram must be a primitive dispatching operation, and all calls to the formal subprogram from within an instance have dispatching semantics. There is a predefined generic unit called Generic_Dispatching_Constructor that can be instantiated with a dispatching constructor function, providing "factory" capability that can construct a tagged object when given a tag and other parameter information. An application of this features is to redefine stream attributes such 'Class'Input to support alternative tag representations. Also as part of the implementation of this AI, the package Ada.Tags has been extended with a function Parent_Tag and a constant No_Tag.
Mar 26th, 2005
New warning for DOS line terminators
A new warning switch -gnatyd is implemented which causes warnings to be generated for any line terminator that is other than a single LF (and in particular DOS line ending sequences (CR/LF) are flagged. This is part of the default set of -gnatg switches for the GNAT sources, but it is not part of the standard -gnaty default set.
Mar 22nd, 2005
External ref defaults may be expressions
Default for external references (the second optional argument of built-in function "external" in project files) may be string expressions. They are no longer restricted to literal strings.
Mar 21st, 2005
VMS symbol file same as reference file
On VMS, the limitation that, for Stand-Alone Libraries, the symbol file need to be different from the reference symbol file has been removed.
Better msg for generic private child
A clearer error message is now generated for an (illegal) attempt to declare a generic private child package.
New warning for bad fixed-point value
If the value of a static fixed-point expression is not multiple of the Small value, then the result is dependent on the implementation which is free to choose either near value. GNAT always chooses the nearer value, but it is good practice to make sure that such values are exact multiples of Small. A new warning -gnatwb (in VMS this is /WARNINGS=BAD_FIXED_VALUES) triggers warnings when fixed-point values are not a multiple of the small value.
Clearer message for raise stopping copy
The message warning that a raise statement results in an abnormal return causing an assignment to a pass-by-copy formal to have no effect can be misleading if the raise is handled locally. The message now says that it "may result" in an abnormal return, resulting in less confusion in the rare case where this is a false positive warning.
Mar 18th, 2005
Improved message for illegal conversions
When an illegal conversion between non-subtype-conformant local access-to-subprogram types is attempted, the error message now includes a specific indication of the cause of the non-conformance.
AI-218 Accidental overloading when overriding
To prevent accidental overloading when an explicit subprogram overrides an inherited operation, an overriding indicator can be added to a subprogram declaration, renaming, or instantiation. If the indicator is Overriding, the subprogram must override an inherited operation at the point of declaration. If the indicator is Not Overriding, the subprogram must not override either at the point of declaration or later (this last clause covers the case when the inherited operation becomes visible after the subprogram declaration, as when inherited through a full view).
Mar 6th, 2005
Large bit packed arrays can be unaligned
If a packed array has an element size that is a power of two (1,2,4,8,16,32), then a component of this type can be positioned at any arbitrary bit boundary in a record. Previously, such components had to be byte aligned.
Mar 4th, 2005
Multiple project trees for project manager
The Project Manager is now able to parse and process several project trees and to keep these project trees in memory at the same time. This will enable GPS to have several project trees in memory and to switch between these different project trees.
AI-361 Raise with string message
This allows the use of a "WITH string" phrase in a raise statement. The effect is the same as calling the routine Raise_Exception with the given string expression.