From: Robert Dewar Date: Thu, 31 Jul 2008 08:19:24 +0000 (+0200) Subject: gnat_ugn.texi: Update -gnatN documentation. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d47f523225d50a2858686471e22060d1fd7abfaa;p=gcc.git gnat_ugn.texi: Update -gnatN documentation. 2008-07-31 Robert Dewar * gnat_ugn.texi: Update -gnatN documentation. * gnat_rm.texi: Add note about pre/postcondition pragmas not checked in conjunction with front-end inlining. From-SVN: r138366 --- diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 1d875a1f3c4..3278d89d703 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -3792,6 +3792,13 @@ package Sort is end Sort; @end smallexample +@noindent +Note: postcondition pragmas associated with subprograms that are +marked as Inline_Always, or those marked as Inline with front-end +inlining (-gnatN option set) are accepted and legality-checked +by the compiler, but are ignored at run-time even if postcondition +checking is enabled. + @node Pragma Precondition @unnumberedsec Pragma Precondition @cindex Preconditions @@ -3826,13 +3833,22 @@ package Math_Functions is end Math_Functions; @end smallexample -@code{Postcondition} pragmas may appear either immediate following the +@noindent +@code{Precondition} pragmas may appear either immediate following the (separate) declaration of a subprogram, or at the start of the declarations of a subprogram body. Only other pragmas may intervene (that is appear between the subprogram declaration and its postconditions, or appear before the postcondition in the declaration sequence in a subprogram body). +Note: postcondition pragmas associated with subprograms that are +marked as Inline_Always, or those marked as Inline with front-end +inlining (-gnatN option set) are accepted and legality-checked +by the compiler, but are ignored at run-time even if postcondition +checking is enabled. + + + @node Pragma Profile (Ravenscar) @unnumberedsec Pragma Profile (Ravenscar) @findex Ravenscar diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index b55f398be8a..c0361785853 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -2368,7 +2368,7 @@ that for inlining to actually occur as a result of the use of this switch, it is necessary to compile in optimizing mode. @cindex @option{-gnatN} switch -The use of @option{-gnatN} activates a more extensive inlining optimization +The use of @option{-gnatN} activates inlining optimization that is performed by the front end of the compiler. This inlining does not require that the code generation be optimized. Like @option{-gnatn}, the use of this switch generates additional dependencies. @@ -2376,6 +2376,12 @@ Note that @option{-gnatN} automatically implies @option{-gnatn} so it is not necessary to specify both options. +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 +@option{-gnatN} is deprecated, and the use of @option{-gnatn} is preferred. +Historically front end inlining was more extensive than the gcc back end +inlining, but that is no longer the case. + @item If an object file @file{O} depends on the proper body of a subunit through inlining or instantiation, it depends on the parent unit of the subunit.