Commit ecb955bc by Arnaud Charlet

[multiple changes]

2009-07-28  Sergey Rybin  <rybin@adacore.com>

	* gnat_ugn.texi: gnatcheck Deeply_Nested_Inlining rule: Update doc.

2009-07-28  Pascal Obry  <obry@adacore.com>

	* g-expect.adb: Record standard handles only on Windows.

From-SVN: r150145
parent 549fd9e4
2009-07-28 Sergey Rybin <rybin@adacore.com>
* gnat_ugn.texi: gnatcheck Deeply_Nested_Inlining rule: Update doc.
2009-07-28 Pascal Obry <obry@adacore.com>
* g-expect.adb: Record standard handles only on Windows.
2009-07-27 Emmanuel Briot <briot@adacore.com>
* prj.ads, prj-nmsc.adb (Override_Kind): add debug trace
......
......@@ -1195,21 +1195,25 @@ package body GNAT.Expect is
pragma Warnings (Off, Pipe2);
pragma Warnings (Off, Pipe3);
On_Windows : constant Boolean := Directory_Separator = '\';
Input : File_Descriptor;
Output : File_Descriptor;
Error : File_Descriptor;
begin
-- Since Windows does not have a separate fork/exec, we need to
-- perform the following actions:
-- - save stdin, stdout, stderr
-- - replace them by our pipes
-- - create the child with process handle inheritance
-- - revert to the previous stdin, stdout and stderr.
Input := Dup (GNAT.OS_Lib.Standin);
Output := Dup (GNAT.OS_Lib.Standout);
Error := Dup (GNAT.OS_Lib.Standerr);
if On_Windows then
-- Since Windows does not have a separate fork/exec, we need to
-- perform the following actions:
-- - save stdin, stdout, stderr
-- - replace them by our pipes
-- - create the child with process handle inheritance
-- - revert to the previous stdin, stdout and stderr.
Input := Dup (GNAT.OS_Lib.Standin);
Output := Dup (GNAT.OS_Lib.Standout);
Error := Dup (GNAT.OS_Lib.Standerr);
end if;
-- Since we are still called from the parent process, there is no way
-- currently we can cleanly close the unneeded ends of the pipes, but
......@@ -1223,8 +1227,8 @@ package body GNAT.Expect is
Portable_Execvp (Pid.Pid'Access, Cmd & ASCII.NUL, Args);
-- The following commands are not executed on Unix systems, and are
-- only required for Windows systems. We are now in the parent process.
-- The following commands are not executed on Unix systems, and are only
-- required for Windows systems. We are now in the parent process.
-- Restore the old descriptors
......@@ -1277,8 +1281,8 @@ package body GNAT.Expect is
-- Reuse the standard output pipe for standard error
Pipe3.all := Pipe2.all;
else
else
-- Create a separate pipe for standard error
if Create_Pipe (Pipe3) /= 0 then
......
......@@ -21308,23 +21308,12 @@ for a generic declaration.
@cindex @code{Deeply_Nested_Inlining} rule (for @command{gnatcheck})
@noindent
Flags the body of a subprogram (or generic subprogram) if
pragma Inline has been applied to the subprogram but the body
contains a call to another inlined subprogram that results in nested inlining
Flags a subprogram (or generic subprogram) if
pragma Inline has been applied to the subprogram but the subprogram
calls to another inlined subprogram that results in nested inlining
with nesting depth exceeding the value specified by the
@option{N} rule parameter.
This rule assumes that pragma Inline applies equally to calls on
subprograms regardless of whether the subprogram declaration appears in the
same compilation unit as the call, or in a separately compiled
(e.g., @i{with}ed) unit.
This rule may be useful when either the @option{-gnatn} or @option{-gnatN}
option is used.
If a subprogram should be flagged according to this rule, the body declaration
is flagged only if it is not a completion of a subprogram declaration.
This rule requires the global analysis of all the compilation units that
are @command{gnatcheck} arguments; such analysis may affect the tool's
performance.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment