Commit 80298b89 by Arnaud Charlet

gnat_ugn.texi: Remove extra paren check from list of checks for redundant constructs Add...

	* gnat_ugn.texi:
	Remove extra paren check from list of checks for redundant constructs
	Add documentation of new -gnatyx style check (check extra parens)
	Remove paragraph about gnatelim debug options.

	* gnat_rm.texi: Document that Ada.Streams now forbids creating stream
	objects rather than forbidding dependencies on the package Ada.Streams.

	* sinfo.ads: Add ??? note that we should document pragmas passed to
	back end.

	* g-expect.ads: Fix a few typos in the comments.

From-SVN: r90915
parent 3fa251d0
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2000-2003 Ada Core Technologies, Inc. -- -- Copyright (C) 2000-2004 Ada Core Technologies, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
-- Non_Blocking_Spawn -- Non_Blocking_Spawn
-- (Fd, "ftp", -- (Fd, "ftp",
-- (1 => new String' ("machine@domaine"))); -- (1 => new String' ("machine@domain")));
-- Timeout := 10000; -- 10 seconds -- Timeout := 10000; -- 10 seconds
-- Expect (Fd, Result, Regexp_Array'(+"\(user\)", +"\(passwd\)"), -- Expect (Fd, Result, Regexp_Array'(+"\(user\)", +"\(passwd\)"),
-- Timeout); -- Timeout);
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
-- name of the language by doing: -- name of the language by doing:
-- declare -- declare
-- Matched : Regexp_Array (0 .. 2); -- Matched : Match_Array (0 .. 2);
-- begin -- begin
-- Expect (Fd, Result, "lang=(optional)? ([a-z]+)", Matched); -- Expect (Fd, Result, "lang=(optional)? ([a-z]+)", Matched);
-- Put_Line ("Seen: " & -- Put_Line ("Seen: " &
...@@ -309,8 +309,7 @@ package GNAT.Expect is ...@@ -309,8 +309,7 @@ package GNAT.Expect is
function "+" (S : String) return GNAT.OS_Lib.String_Access; function "+" (S : String) return GNAT.OS_Lib.String_Access;
-- Allocate some memory for the string. This is merely a convenience -- Allocate some memory for the string. This is merely a convenience
-- convenience function to help create the array of regexps in the -- function to help create the array of regexps in the call to Expect.
-- call to Expect.
procedure Expect procedure Expect
(Descriptor : in out Process_Descriptor; (Descriptor : in out Process_Descriptor;
......
...@@ -7085,8 +7085,12 @@ user-defined storage pool. ...@@ -7085,8 +7085,12 @@ user-defined storage pool.
@item No_Streams @item No_Streams
@findex No_Streams @findex No_Streams
This restriction ensures at compile time that there are no implicit or This restriction ensures at compile/bind time that there are no
explicit dependencies on the package @code{Ada.Streams}. stream objects created (and therefore no actual stream operations).
This restriction does not forbid dependences on the package
@code{Ada.Streams}. So it is permissible to with
@code{Ada.Streams} (or another package that does so itself)
as long as no actual stream objects are created.
@item No_Task_Attributes_Package @item No_Task_Attributes_Package
@findex No_Task_Attributes_Package @findex No_Task_Attributes_Package
...@@ -13382,7 +13386,7 @@ Word : Rec; ...@@ -13382,7 +13386,7 @@ Word : Rec;
@end group @end group
@end smallexample @end smallexample
@noindent @noindent
Such an object is said to be @emph{unconstrained}. Such an object is said to be @emph{unconstrained}.
The discriminant of the object The discriminant of the object
can be modified by a full assignment to the object, as long as it preserves the can be modified by a full assignment to the object, as long as it preserves the
......
...@@ -4791,9 +4791,6 @@ operand) which has no effect. ...@@ -4791,9 +4791,6 @@ operand) which has no effect.
Use of the operator abs on an operand that is known at compile time Use of the operator abs on an operand that is known at compile time
to be non-negative to be non-negative
@item @item
Use of an unnecessary extra level of parentheses (C-style) around conditions
in @code{if} statements, @code{while} statements and @code{exit} statements.
@item
Comparison of boolean expressions to an explicit True value. Comparison of boolean expressions to an explicit True value.
@end itemize @end itemize
...@@ -5525,6 +5522,14 @@ A unary plus or minus may not be followed by a space. ...@@ -5525,6 +5522,14 @@ A unary plus or minus may not be followed by a space.
A vertical bar must be surrounded by spaces. A vertical bar must be surrounded by spaces.
@end itemize @end itemize
@item ^x^XTRA_PARENS^
@emph{Check extra parentheses.}
Check for the use of an unnecessary extra level of parentheses (C-style)
around conditions in @code{if} statements, @code{while} statements and
@code{exit} statements.
@end table
@noindent @noindent
In the above rules, appearing in column one is always permitted, that is, In the above rules, appearing in column one is always permitted, that is,
counts as meeting either a requirement for a required preceding space, counts as meeting either a requirement for a required preceding space,
...@@ -5534,8 +5539,6 @@ Appearing at the end of a line is also always permitted, that is, counts ...@@ -5534,8 +5539,6 @@ Appearing at the end of a line is also always permitted, that is, counts
as meeting either a requirement for a following space, or as meeting as meeting either a requirement for a following space, or as meeting
a requirement for no following space. a requirement for no following space.
@end table
@noindent @noindent
If any of these style rules is violated, a message is generated giving If any of these style rules is violated, a message is generated giving
details on the violation. The initial characters of such messages are details on the violation. The initial characters of such messages are
...@@ -9466,15 +9469,6 @@ available on the path. ...@@ -9466,15 +9469,6 @@ available on the path.
@cindex @option{^--GNATMAKE^/GNATMAKE^} (@command{gnatelim}) @cindex @option{^--GNATMAKE^/GNATMAKE^} (@command{gnatelim})
Instructs @code{gnatelim} to use specific @code{gnatmake} instead of one Instructs @code{gnatelim} to use specific @code{gnatmake} instead of one
available on the path. available on the path.
@item -d@var{x}
@cindex @option{-d@var{x}} (@command{gnatelim})
Activate internal debugging switches. @var{x} is a letter or digit, or
string of letters or digits, which specifies the type of debugging
mode desired. Normally these are used only for internal development
or system debugging purposes. You can find full documentation for these
switches in the spec of the @code{Gnatelim} unit in the compiler
source file @file{gnatelim.ads}.
@end table @end table
@noindent @noindent
......
...@@ -1767,6 +1767,11 @@ package Sinfo is ...@@ -1767,6 +1767,11 @@ package Sinfo is
-- Debug_Statement (Node3) (set to Empty if not Debug, Assert) -- Debug_Statement (Node3) (set to Empty if not Debug, Assert)
-- Next_Rep_Item (Node4-Sem) -- Next_Rep_Item (Node4-Sem)
-- Note: we should have a section on what pragmas are passed on to
-- the back end to be processed. This section should note that pragma
-- Psect_Object is always converted to Common_Object, but there are
-- undoubtedly many other similar notes required ???
-------------------------------------- --------------------------------------
-- 2.8 Pragma Argument Association -- -- 2.8 Pragma Argument Association --
-------------------------------------- --------------------------------------
......
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