- Ada 2012
- Ada 2005 / 95 / 83
- Embedded Development
- Formal Methods
- Open Source
- Safety-Critical Development
- Static Analysis
Better error message for illegal completions
The error message generated for a private type that is completed by an unconstrained type with discriminants has been improved, to avoid using the technical and somewhat obscure term "definite subtype".
More complete enforcement of No_Abort_Statements
This restriction now forbids all use of Ada.Task_Identification.Abort_Task, including renamings and the use of 'Access. In addition all checks of this restriction are not carried out even if code is not being generated (-gnatc) which was not the case previously.
Dec 30th, 2013
Pragma Warning_As_Error (selected warnings as errs)
A new pragma Warning_As_Error allows specification of selected sets of warnings to be treated as errors. The warnings can either be selected by pattern matching with the text of the messages (as is done now for pragma Warnings), or a class of warnings specificed by -gnatw switch can be given.
Dec 29th, 2013
Better handling of anonmous access type convention
Two changes are made to improve the handling of conventions for anonymous access types, and in particular anonymous access-to-subprogram types. It is not possible to explicitly specify the convention for such types, since they have no name, so previously they were always convention Ada. To give more control, first, if a convention is explicitly given for an object or component whose type is an anonymous access [to subprogram] type, then this type inherits the convention. Second if a convention is given for a record, then any components whose types are anonymous access [to subprogram] types which do not have a specified convention inherit the record convention.
Documentation for pragma Reviewable
A new section in the GNAT RM describes the effect of pragma Reviewable, and how it is possible to obtain all the information that is required to be output when this pragma is used.
More accurate messages for bad left sides
If code generation is inactive (-gnatc mode, or after some other illegality has been detected), the messages for incorrect assignments to non-variables are more accurate, avoiding confusion.
Update library documentation for Ada 2012
The "Standard Library Routines" chapter of the GNAT RM has been updated to include all packages defined in the Ada 2012 RM.
Pragma Assert (False) as function exit
The compiler checks that all exit points from a function end with either a raise statement or a return. If pragma Assert (False) is used this seems a very reasonable way to indicate that it is an error if this branch is taken, and such a pragma should inhibit the warning. For the case where assertions were enabled this always worked fine (since such an assertion gets turned into a raise statement), but if assertions were disabled, the warning was given. With this change, the pragma is recognized and the warning suppressed whether or not assertions are enabled.
Documentation of handling of records with holes
Records may contain holes or gaps with bits that do not correspond to the location of any component in the record. This can occur as a result of alignment requirements, or through the use of explicit component clauses that leave such gaps. A documentation section has been added to the GNAT reference manual that explains that GNAT does not initialize such holes, and that in general they may contain undefined rubbish.
Clean up and new switches for elaboration messages
Previously, the -gnatwl switch controlled two kinds of messages, real warning messages that are generally useful (e.g. warning on use of pragma Elaborate in the static elaboration model), and also info messages, useful only when debugging cycles in the static elaboration model. These are now separated, -gnatwl/-gnatwL controls only the warning messages, and -gnatel/-gnateL are new switches used to turn the info messages on and off.
Dec 26th, 2013
Warnings off to kill Unchecked_Conversion warnings
Given a declaration like "function f is new Unchecked_Conversion (...)", any warnings associated with this instantiation can now be suppressed by applying a pragma Warnings (Off) to the function instance (f in this example).
Dec 25th, 2013
New pragma Provide_Shift_Operators
A new pragma Provide_Shift_Operators can be given with a single argument that is the local name of an integer first subtype. The effect is to provide the five shift operators for this type (Shift_Left, Shift_Right, Rotate_Left, Rotate_Right, Shift_Right_Arithmetic) avoiding needing to write out the five function declarations and corresponding import pragmas.
Dec 24th, 2013
It is now allowed to use RAISE WITH in the compiler
It is now permissible to use the RAISE WITH construct internally in the compiler sources and run-time. Mostly this is an internal change, but it does affect bootstrap requirements. Bootstrapping GNAT now requires a GCC 4.1 compiler or GNAT Pro version 5.04a1.
Dec 22nd, 2013
Add support for artifacts in gprinstall
It is now possible to install files or directories not part of the project (source or object). Those artifacts are described into the project's Install package and can be used to install documentation or examples.
Dec 21st, 2013
New codepeer_msg_reader switch: -show-header
A new switch -show-header can be used when calling codepeer_msg_reader (either directly or via the -output-msg switch) to display a header containing information about the codepeer run (date, version, etc...).
GPS: Periodic recomputation of XRefs while editing
Cross references information is recomputed regularly with the live content of the editor every time the content of the buffer is changed. This in turns gives better support for navigation, highlighting, and every functionality based on cross references.
GPS: Automatic indentation of pasted content
When you paste content in a source editor that supports automatic indentation, it will be indented automatically, provided you have switched the feature on via the preferences dialog (Editor -> Auto indent on paste)
GPS: Improved auto-align end of line comments
Align end of line comments now ignores comments that don't have code before them.
Dec 16th, 2013
Serial_Error includes meaningful OS error message
When GNAT.Serial_Communication routines raise the Serial_Error exception, a meaningful error message from the underlying OS is provided in the exception message, instead of just a numeric error code.
Dec 15th, 2013
Pre/Postconditions tested for imported subprograms
Previously, preconditions and postconditions for imported subprograms were taken into account by the SPARK 2014 proof tools, but were ignored by the code generator with a warning. Now they are fully tested, and will cause run-time exceptions if violated, as for any other subprogram.
GPS: Bind goto next/previous location to Alt+Arrows
Goto next location is now bound to Alt+Right and Goto previous location is now bound to Alt+Left. This is meant to mimic the behaviour of numerous modern applications, most notably popular web browsers, have for navigating the history.
Dec 11th, 2013
Improved error recovery for bad null component
The compiler now handles a null component appearing in a non-null record much more nicely, giving a clear error message, and proceeding ahead to scan the remaining legal components.
Dec 9th, 2013
Remove Ada version aspects
The aspects Ada_2005, Ada_2012, are removed. Their use was a potential source of confusion, because for example it did not work to use them as aspects on a package specification (a most natural attempted use), because in this case they were handled too late. The use of the pragma is much clearer.
Dec 8th, 2013
Direct project support for ASIS-based tools
A set of project-specific options is added to ASIS-based tools (gnatcheck, gnatelim, gnatpp, gnatstub, gnat2xml). Now it is possible to use a project file as a parameter to these tools, and the tool behavior is similar to the case where the tool is called from the GNAT driver.
Dec 5th, 2013
AAMP names for floating-point types in Interfaces
The floating-point types declared in the AAMP version of package System are now declared with names AAMP_Float_32 and AAMP_Float_48, replacing the previous IEEE names.
Dec 4th, 2013
Avoid use of theta symbol in dimension facility
Previously, theta was used for display of Kelvin when using the dimension capability. This looked nice, but was problematical in environments which did not support the Latin-1 display mapping of upper half ASCII (e.g. many PC environments). The symbol has been changed to '@', which doesn't look as nice as a real theta, but is universally displayable.
GPS: Highlight custom patterns in Messages View
The Message View highlights text according to user defined regular expressions and colors.
Dec 2nd, 2013
Element iterators can be used on formal containers
Iterators of the form "for Elem of Container" can be applied to types to which the Iterable aspect applies, if the Element attribute is specified.
GPS: Minor enhancements to the tip-of-the-day
The "tip of the day" dialog can now be moved, and the text for the documentation can be selected.
Dec 1st, 2013
Composite Object_Size can be multiple of Alignment
The compiler now allows the specification of an object size value for a composite type if it is a multiple of the alignment. Previously some values that met this requirement were rejected. E.g, the following is now accepted:
type R is record A : Integer; B : Character; end record; for R'Object_Size use 40; for R'Size use 40; for R'Alignment use 1;