- Ada 2012
- Ada 2005 / 95 / 83
- Embedded Development
- Formal Methods
- Open Source
- Safety-Critical Development
- Static Analysis
Dec 30th, 2006
Warning for convention C for discriminated record
The use of pragma Convention to set a convention other than Ada for a record with discriminants is dubious, since other languages do not have types that exactly correspond to the Ada variant record. A warning is now generated for this usage. The warning is suppressed in the Unchecked_Union case, since the whole point of unchecked unions is to aid in foreign language interfacing.
Checking for IN mode parameters in -gnatg mode
GNAT source style mode does not permit the use of IN mode (this is the default, and it need not, and in GNAT source code must not, be explicitly specified). This is now automatically checked if -gnatg is specified.
Suppression of reference warnings
Reference warnings (for example, never read or never written) for variables are now suppressed if the type or base type of the variable has warnings suppressed with pragma Warnings (Off, typ).
Dec 28th, 2006
Convention C for enumeration object size warning
If an object of an enumeration type has Convention C, and the size is less than the size of int, then this is a bit suspicious, since normally C would use int for enumeration types. A warning is now given in this case for non- character enumeration types for which no explicit size is given.
More efficient code for Initialize_Scalars
In the case where an array is explicitly initialized with an aggregate, it is not necessary for Initialize_Scalars to cause a separate initialization. Previously such arrays were initialized twice.
New GNAT style check option
The style check flag -gnatyg enforces exactly the same set of style checks that are used by the GNAT source code itself. This may be useful when you are developing code for eventual inclusion in GNAT. Note that this is not the same as -gnatg, which also allows such non-standard language constructs as recompiling children of Ada. It only enforces style checks.
Optimization option -Os is documented
The users guide now mentions optimization option -Os (optimize for space) making this an officially supported gcc flag. A VMS equivalent has been added (/OPTIMIZE=SPACE). This option has worked fine on previous versions of GNAT, but was not officially documented in the users guide.
Clearer warnings from -gnatwl in static mode
The warnings for possible access before elaboration are now specialized according to the current elaboration model. In static mode, we now avoid suggesting adding pragma Elaborate or Elaborate_All (which would be wrong) and instead just note that implicit pragmas are being generated.
Dec 25th, 2006
GNAT.Heap_Sort_G and Bubble_Sort_G are now pure
Changes in the Ada 2005 rules have made it possible to make the generic sorting packages (GNAT.Heap_Sort_G and GNAT.Bubble_Sort_G) Pure, so that they can be used from Pure units in both Ada 95 mode and Ada 2005 mode.
Project-wide checks and metrics
The GNAT Driver has been enhanced so that it can be use to call gnatcheck or gnatmetric on all the units of a project, all the units of a set of projects or all the units needed to build a main program.
New pragma Universal_Aliasing
This new pragma inhibits strict type-based aliasing optimization for the type it is applied to, i.e. the effect is as though access types designating this type were automatically subject to pragma No_Strict_Aliasing.
Remote programming in the Embedded Technology Journal
The latest edition of the Embedded Technology Journal includes an interesting article on IDE considerations for remote programming. You can find more information on the use of this technology with GNAT and GPS by clicking here, or by contacting email@example.com.
To view the article please click here..
Dec 19th, 2006
Remove restriction on interface types and Ada.Tags
Previous versions of the compiler had a restriction on the use of subprograms Expanded_Name, Wide_Expanded_Name, Wide_Wide_Expanded_Name, and External_Tag with the tag of class-wide interface objects. This restriction has been removed.
Dec 17th, 2006
Improved selection of float stream routines
Long_Float and Long_Long_Float have the same representation on many machines, e.g. SPARC. On such machines, the Long_Float routines were selected for use with long_long_float data being streamed. This is changed so that the type appropriate routines are now used. This has no effect in the standard run time, since the representations are identical, but it can be useful in cases where specialized versions of the Stream_Attributes package are created.
Dec 13th, 2006
Task-safe network database operations
The network database operations in package GNAT.Sockets: Get_Host_By_Name, Get_Host_By_Address, Get_Service_By_Name, and Get_Service_By_Port now take advantage of task safe library functions provided by the underlying operating environment, on platforms where such functions are available, to avoid having to use GNAT.Task_Lock to guarantee correct operations in partitions with tasking. This improves concurrency on these targets.
Dec 8th, 2006
Control encoding of gnatpp out files
A new option -We ('e' has the same values with the same meaning as for the GNAT '-gnatWe' option) is added to gnatpp. This option sets the wide character encoding method used for gnatpp out files.
Dec 5th, 2006
gnatpp can process Ada 2005 sources
The gnatpp tool fully supports Ada 2005.
Dec 4th, 2006
New switches -R and -Z for gnatbind
Two new switches are added to gnatbind: -R to output the list of sources that are in the closure of a main, but not in the runtime, and -Z to suppress formatting of auxiliary outputs produced by switches -e, -l, -K and -R.