Next: Character Set Control, Previous: Using gcc for Semantic Checking, Up: Switches for gcc
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 or -gnat05 switch earlier in the command line.
For information about the approved “Ada Issues” that have been incorporated into Ada 2005, see http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs. Included with GNAT releases is a file features-ada0y that describes the set of implemented Ada 2005 features.