summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-28 07:29:50 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-28 07:29:50 +0000
commit579986833c399388f95a7f20e9031ea96e96a02d (patch)
treea38f52a14940fd6eb259c9bfcc8d99a88aaf4e4e
parent56aa98d4ed0d549ee548a61e93b732459c87c20a (diff)
downloadgcc-579986833c399388f95a7f20e9031ea96e96a02d.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150145 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/ChangeLog8
-rw-r--r--gcc/ada/g-expect.adb30
-rw-r--r--gcc/ada/gnat_ugn.texi17
3 files changed, 28 insertions, 27 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index bf78d8c825f..476e505fc5e 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,11 @@
+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
diff --git a/gcc/ada/g-expect.adb b/gcc/ada/g-expect.adb
index 405b0331275..5f88f63f076 100644
--- a/gcc/ada/g-expect.adb
+++ b/gcc/ada/g-expect.adb
@@ -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
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 865f5da5118..b776c90957f 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -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.