The switches described in this section allow you to explicitly specify the version of the Ada language that your programs are written in. By default GNAT assumes Ada 2005, but you can also specify Ada 95 or indicate Ada 83 compatibility mode.
With few exceptions (most notably the need to use <>
on
unconstrained generic formal parameters, the use of the new Ada 95 / Ada 2005
reserved words, and the use of packages
with optional bodies), it is not necessary to specify the
-gnat83 switch when compiling Ada 83 programs, because, with rare
exceptions, Ada 95 and Ada 2005 are upwardly compatible with Ada 83. Thus
a correct Ada 83 program is usually also a correct program
in these later versions of the language standard.
For further information, please refer to Compatibility and Porting Guide.
This switch also can be used to cancel the effect of a previous
-gnat83, -gnat05/2005, or -gnat12/2012
switch earlier in the command line.
For information about the approved “Ada Issues” that have been incorporated
into Ada 2012, see http://www.ada-auth.org/ais.html.
Included with GNAT releases is a file features-ada12 that describes
the set of implemented Ada 2012 features.