The switches described in this section allow you to explicitly specify the version of the Ada language that your programs are written in. The default mode is Ada 2012, but you can also specify Ada 95, Ada 2005 mode, or indicate Ada 83 compatibility mode.
-gnat83 (Ada 83 Compatibility Mode)
With few exceptions (most notably the need to use <> on .. index:: Generic formal parameters
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 the Compatibility_and_Porting_Guide chapter in the GNAT Reference Manual.
-gnat95
(Ada 95 mode)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.
-gnat05
or -gnat2005
(Ada 2005 mode)-gnat12
or -gnat2012
(Ada 2012 mode)-gnatX
(Enable GNAT Extensions)