- Ada 2012
- Ada 2005 / 95 / 83
- Embedded Development
- Formal Methods
- Open Source
- Safety-Critical Development
- Static Analysis
Tampering checks added to bounded containers
The tampering checks that prevent a container from being modified while an iteration is in progress are now present in all bounded versions of the predefined containers.
Attribute Has_Same_Storage is implemented
The Ada 2012 attribute Has_Same_Storage (X'Has_Same_Storage (Y) tests to see if X and Y occupy the same storage bits) is now implemented as described in the Ada 2012 RM (previously GNAT had the name Same_Storage for this attribute from an earlier draft of the language definition.
Jan 30th, 2014
Reference machinery is added to Holder container
The Ada 2012 Indefinite holder containers now support the construction of Reference and Constant_Reference objects, together with the finalization machinery required to prevent tampering.
Jan 29th, 2014
More information on precondition messages
Precondition annotations and precondition check messages now display the checks that led to the precondition requirements.
Jan 29th, 2014
Check for clock drift in distributed mode
A clock check is done between the slaves and the build master before starting a distributed compilation. A warning is issued if a clock drift is detected. It is important to have the clock properly synchronized to avoid unneeded recompilation.
Jan 29th, 2014
Avoid unnecessary warnings on alignment
The compiler now does a better job of avoiding unnecessary warnings about alignment when address clauses are used. For instance if a record that has a default alignment of four bytes has an address clause at a compile-time known address that is a multiple of four, no warning will be given when the No_Exception_Propagation exception is set (previously this situation resulted in an unnecessary warning).
Jan 25th, 2014
Identify construct causing Compiler_Unit_Warning
Warnings from the use of pragma Compiler_Unit_Warning now identify the particular construct that is not permitted in a compiler unit. This is primarily of use for implementation work on the run-time library.
Jan 24th, 2014
Tagging of warnings from pragma Obsolescent
Warning messages from the use of pragma Obsolescent are now tagged with [-gnatwj] if -gnatw.d is used, to indicate that these messages relate to obsolescent features and are controlled by -gnatwj/-gnatwJ.
Specifying Restrictions (No_Dependence) in System
It is now possible to use pragma Restrictions (No_Dependence => unit) in package System, to more precisely control the set of restrictions needed for a particular configuration of the run time.
New aspect Thread_Local_Storage
A new aspect Thread_Local_Storage is implemented. This is equivalent to the use of the pragma Thread_Local_Storage.
Jan 22nd, 2014
Add support for grouping installs with gprinstall
A new option named --install-name can be used to group installations under a single name. It makes it possible to uninstall with a single command the multiple installations. This can be handy when a library comes with some tools for example, both built with different projects files. Yet, the library and the executables are tightly related and part of the same application.
GB: Preference to not generate pretty print backup
A new preference has been added to the Tools preference page to not generate a backup .npp file when pretty printing.
Jan 20th, 2014
Reduced executable size for backtraces
It is possible to reduce the size of the executable (in fact of the debugging info) while still allowing the use of GNAT.Traceback.Symbolic by using -g1 instead of -g. Use of the debugger on application compiled with -g1 is not recommended.
System.Unsigned_Types is now a user-accessible unit
This unit provides unsigned types with names and lengths matching the signed types in Standard, e.g. System.Unsigned_Types.Long_Unsigned has the same size as Standard.Long_Integer. Note that this unit has always been available, but in the past was considered an internal unit, and with'ing it warned to that effect. This warning is no longer generated.
More liberal categorization rules for run-time
All run-time units now have the categorization that is specified by the Ada 2012 standard, even in earlier versions of Ada. For example, the unit Ada.Characters.Handling is Pure even in Ada 95 mode. This seems a cleaner approach than trying to differentiate between versions and enforce what were basically mistakes in previous Ada versions. This will not affect any legal programs, just allow some previously illegal ones. As part of this change the internal pragmas and aspects Pure_05, Pure_12, and Preelaborate_12 have been removed (these were not user-program accessible in any case).
Jan 15th, 2014
Clearer array type description printed by debugger
When printing the type description of an array, the debugger will try printing the array indices using the name of the index types, rather than an explicit range, when the range of the array is identical to the range of the index type. For instance, instead of printing "array (false .. true) of [...]", the debugger will now print "array (boolean) of [...]".
Jan 13th, 2014
Use standard initial reference for name service
PolyORB.CORBA_P.Naming_Tools now first looks up the name server using the standard "NameService" initial reference key. The legcay implementation defined "NamingService" key is used as a fallback.
Jan 12th, 2014
Tag all remaining untagged warning messages
All remaining warning messages are now properly tagged when using -gnatw.d. About one hundred [enabled by default] warnings are affected by this change.
Jan 11th, 2014
More consistent info/warning handling, tag -gnatel
This is a general clean up of the handling of info and warning messages which ensures more consistent output. It also causes info messages issued by the elaboration circuitry if option -gnatel is set to be tagged [-gnatel] if you enable tagging of warnings with -gnatw.d.
Jan 10th, 2014
New restriction No_Fixed_IO
A new restriction No_Fixed_IO, which requires partition-wide consistent use, forbids fixed I/O operations which may end up using floating-point at run time. These include any reference to Fixed_IO or Decimal_IO in packages Ada.Text_IO, Ada.Wide_Text_IO, and Ada.Wide_Wide_Text_IO, and any use of the attributes Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image, Wide_Wide_Value with ordinary or decimal fixed-point.
More complete documentation for Unrestricted_Access
Using the Unrestricted_Access attribute to attempt modification of constants is erroneous. This has always been the case, but now this particular case is documented with examples in the GNAT RM. In addition, the GNAT RM now has much more complete documentation on the use of this attribute for the case of subprograms, with extended examples.
The GNAT driver recognizes—help and—version
The GNAT driver recognizes the switches --help and --version. If one or these two switches is used, the prescribed output is displayed and the process terminates its execution.
New warnings on uninitialized entities in instances
The compiler emits a warning on an object of a generic private type if it has no explicit initialization, to indicate that the corresponding actual in any subsequent instance should be a fully initialized type. A related warning is emitted on an instance if the actual does not satisfy this.
Jan 8th, 2014
Handling of overriding on protected subprogram body
The compiler now rejects an overriding indicator on a protected subprogram body, and no longer warns with -gnatyO if such an indicator is missing. The RM clearly disallows such overriding indicators. This may result in existing code which was previously accepted being flagged as illegal now. To aid in transition, the debug flag -gnatd.E will change the new error to a warning.
Jan 6th, 2014
Better semantics for datagram socket streams
The Read and Write primitive operations of datagram socket backed streams now always receive/send a single datagram, instead of doing so in a loop, as this is closer to the underlying transport endpoint semantics.
Allow use of warning tags in pragma Warnings
A warning tag as the second parameter of a pragma Warnings (Off|On, ...) pragma allows control of all error messages in that category. This tag may be either [-gnatw?] for a particular category of errors, or [restriction warning] to cover all restriction warnings, or [enabled by default] to deal with all other warnings that are set by default.
Separate tag for restriction warning messages
Warning messages from pragma Restriction_Warnings (or Profile_Warnings) are now tagged [restriction warning] instead of [enabled by default]. This string can be used as a tag in Warning_As_Errors to turn these back into errors.
More complete documentation of -gnatw.g and -gnatyg
The switches -gnatw.g (gnat warnings) and -gnatyg (gnat style switches) are now fully documented in the users guide and in the usage output. The former warns that these switches are subject to change without prior notice.
Jan 1st, 2014
More complete enforcement of No_Dynamic_Attachment
This restriction now forbids renmaing and 'Access of any of the entities, not just calls. 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.