Next: Auxiliary Output Control, Previous: File Naming Control, Up: Switches for gcc
n
here is intended to suggest the first syllable of the
word “inline”.
GNAT recognizes and processes Inline
pragmas. However, for the
inlining to actually occur, optimization must be enabled. To enable
inlining of subprograms specified by pragma Inline
,
you must also specify this switch.
In the absence of this switch, GNAT does not attempt
inlining and does not need to access the bodies of
subprograms for which pragma Inline
is specified if they are not
in the current unit.
If you specify this switch the compiler will access these bodies,
creating an extra source dependency for the resulting object file, and
where possible, the call will be inlined.
For further details on when inlining is possible
see Inlining of Subprograms.
When using a gcc-based back end (in practice this means using any version of GNAT other than the JGNAT, .NET or GNAAMP versions), then the use of -gnatN is deprecated, and the use of -gnatn is preferred. Historically front end inlining was more extensive than the gcc back end inlining, but that is no longer the case.