Commit 16d3a853 by Arnaud Charlet

[multiple changes]

2013-04-22  Yannick Moy  <moy@adacore.com>

	* gnat_rm.texi, exp_util.adb, sem_prag.adb, sem_prag.ads, par-ch2.adb,
	opt.ads, sem_ch13.adb: Minor correction of typos in comments/doc.

2013-04-22  Vincent Celier  <celier@adacore.com>

	* prj-nmsc.adb (Check_Library_Attributes): Set Library_Dir to
	No_Path_Information only when Directories_Must_Exist_In_Projects
	is False.
	(Get_Directories): Set Object_Directory
	or Exec_Directory to No_Path_Information only when
	Directories_Must_Exist_In_Projects is False.

From-SVN: r198129
parent ddb8a2c7
2013-04-22 Yannick Moy <moy@adacore.com>
* gnat_rm.texi, exp_util.adb, sem_prag.adb, sem_prag.ads, par-ch2.adb,
opt.ads, sem_ch13.adb: Minor correction of typos in comments/doc.
2013-04-22 Vincent Celier <celier@adacore.com>
* prj-nmsc.adb (Check_Library_Attributes): Set Library_Dir to
No_Path_Information only when Directories_Must_Exist_In_Projects
is False.
(Get_Directories): Set Object_Directory
or Exec_Directory to No_Path_Information only when
Directories_Must_Exist_In_Projects is False.
2013-04-22 Yannick Moy <moy@adacore.com>
* par-prag.adb, sem_attr.adb, sem_ch6.adb, sem_prag.adb, sem_warn.adb,
snames.ads-tmpl, sinfo.ads, sem_util.ads: Remove all references to
Pragma_Contract_Case and Name_Contract_Case.
......
......@@ -5589,7 +5589,7 @@ package body Exp_Util is
begin
-- Compute proper name to use, we need to get this right so that the
-- right set of check policies apply to the CHeck pragma we are making.
-- right set of check policies apply to the Check pragma we are making.
if Has_Dynamic_Predicate_Aspect (Typ) then
Nam := Name_Dynamic_Predicate;
......
......@@ -1235,7 +1235,7 @@ Syntax:
@smallexample @c ada
pragma Assertion_Policy (CHECK | DISABLE | IGNORE);
Pragma Assertion_Policy (
pragma Assertion_Policy (
ASSERTION_KIND => POLICY_IDENTIFIER
@{, ASSERTION_KIND => POLICY_IDENTIFIER@});
......@@ -1442,8 +1442,11 @@ pragma Check (
[Check =>] Boolean_EXPRESSION
[, [Message =>] string_EXPRESSION] );
CHECK_KIND ::= IDENTIFIER |
Pre'Class | Post'Class | Type_Invariant'Class
CHECK_KIND ::= IDENTIFIER |
Pre'Class |
Post'Class |
Type_Invariant'Class |
Invariant'Class
@end smallexample
@noindent
......@@ -1557,7 +1560,7 @@ pragma Check_Policy
([Name =>] CHECK_KIND,
[Policy =>] POLICY_IDENTIFIER);
Pragma Check_Policy (
pragma Check_Policy (
CHECK_KIND => POLICY_IDENTIFIER
@{, CHECK_KIND => POLICY_IDENTIFIER@});
......@@ -1589,14 +1592,14 @@ and if the check kind corresponds to one of the assertion kinds that
are allowed by @code{Assertion_Policy}, then the effect is identical.
If the first argument is Debug, then the policy applies to Debug pragmas,
disabling their effect if the policy is @code{Off}, @code{Disable}, or
@code{Ignore}, and allowing them to execute with normal semantics if
the policy is @code{On} or @code{Check}. In addition if the policy is
@code{Disable}, then the procedure call in @code{Debug} pragmas will
be totally ignored and not analyzed semanticslly.
disabling their effect if the policy is @code{OFF}, @code{DISABLE}, or
@code{IGNORE}, and allowing them to execute with normal semantics if
the policy is @code{ON} or @code{CHECK}. In addition if the policy is
@code{DISABLE}, then the procedure call in @code{Debug} pragmas will
be totally ignored and not analyzed semantically.
Finally the first argument may be some other identifier than the above
posibilities, in which case it controls a set of named assertions
possibilities, in which case it controls a set of named assertions
that can be checked using pragma @code{Check}. For example, if the pragma:
@smallexample @c ada
......
......@@ -301,7 +301,7 @@ package Opt is
-- terminated by Empty. The order is most recently processed first. Note
-- that Push_Scope and Pop_Scope in Sem_Ch8 save and restore the value
-- of this variable, implementing the required scope control for pragmas
-- appearing a declarative part.
-- appearing in a declarative part.
Check_Readonly_Files : Boolean := False;
-- GNATMAKE
......
......@@ -459,7 +459,7 @@ package body Ch2 is
-- | [pragma_argument_ASPECT_MARK =>] EXPRESSION
-- where the interesting allowed cases (which do not fit the syntax of the
-- first alternative above are
-- first alternative above) are
-- ASPECT_MARK ::=
-- Pre'Class | Post'Class | Invariant'Class | Type_Invariant'Class
......
......@@ -3166,9 +3166,10 @@ package body Prj.Nmsc is
(Data.Flags,
"library directory { does not exist",
Lib_Dir.Location, Project);
end if;
Project.Library_Dir := No_Path_Information;
else
Project.Library_Dir := No_Path_Information;
end if;
-- Checks for object/source directories
......@@ -5421,10 +5422,10 @@ package body Prj.Nmsc is
(Data.Flags, Data.Flags.Require_Obj_Dirs,
"object directory { not found",
Project.Location, Project);
end if;
Project.Object_Directory := No_Path_Information;
else
Project.Object_Directory := No_Path_Information;
end if;
end if;
end if;
......@@ -5502,9 +5503,10 @@ package body Prj.Nmsc is
Error_Or_Warning
(Data.Flags, Data.Flags.Missing_Source_Files,
"exec directory { not found", Project.Location, Project);
end if;
Project.Exec_Directory := No_Path_Information;
else
Project.Exec_Directory := No_Path_Information;
end if;
end if;
end if;
end if;
......
......@@ -1460,7 +1460,7 @@ package body Sem_Ch13 is
Expression => Relocate_Node (Expr))),
Class_Present => Class_Present (Aspect),
Pragma_Identifier =>
Make_Identifier (Sloc (Id), Name_Invariant));
Make_Identifier (Sloc (Id), Name_Invariant));
-- Add message unless exception messages are suppressed
......
......@@ -7467,7 +7467,7 @@ package body Sem_Prag is
-- Type_Invariant |
-- Type_Invariant'Class
-- ID_ASSERTION_KIND ::= Assert_And_Cut }
-- ID_ASSERTION_KIND ::= Assert_And_Cut |
-- Assume |
-- Contract_Cases |
-- Debug |
......@@ -7490,11 +7490,11 @@ package body Sem_Prag is
-- the corresponding assertion. If Disable is specified, then the
-- argument of the assertion is not even analyzed. This is useful
-- when the aspect/pragma argument references entities in a with'ed
-- packaqe that is replaced by a dummy package in the final build.
-- package that is replaced by a dummy package in the final build.
-- Note: the attribute forms Pre'Class, Post'Class, Invariant'Class,
-- and Type_Invariant'Class were recognized by the parser and
-- transformed into referencea to the special internal identifiers
-- transformed into references to the special internal identifiers
-- _Pre, _Post, _Invariant, and _Type_Invariant, so no special
-- processing is required here.
......@@ -7513,9 +7513,9 @@ package body Sem_Prag is
if Is_Configuration_Pragma then
null;
-- It can also appear in a declaration or package spec in Ada
-- 2012 mode. We allow this in other modes, but in that case
-- we consider that we have an Ada 2012 pragma on our hands.
-- It can also appear in a declarative part or package spec in Ada
-- 2012 mode. We allow this in other modes, but in that case we
-- consider that we have an Ada 2012 pragma on our hands.
else
Check_Is_In_Decl_Part_Or_Package_Spec;
......@@ -8338,8 +8338,8 @@ package body Sem_Prag is
-- For the new syntax, what we do is to convert each argument to
-- an old syntax equivalent. We do that because we want to chain
-- old style Check_Pragmas for the search (we don't wnat to have
-- to deal with multiple arguments in the search)
-- old style Check_Policy pragmas for the search (we don't want
-- to have to deal with multiple arguments in the search.)
else
declare
......@@ -17923,7 +17923,7 @@ package body Sem_Prag is
when Name_Pre => Ename := Name_uPre;
when Name_Post => Ename := Name_uPost;
when Name_Type_Invariant => Ename := Name_uType_Invariant;
when others => raise Program_Error;
when others => raise Program_Error;
end case;
end if;
end if;
......
......@@ -75,15 +75,15 @@ package Sem_Prag is
procedure Check_Applicable_Policy (N : Node_Id);
-- N is either an N_Aspect or an N_Pragma node. There are two cases. If
-- the name of the aspect or pragma is not one of those recognized as a
-- assertion kind by an Assertion_Kind pragma, then the call has no effect.
-- Note that in the case of a pragma derived from an aspect, the name
-- we use for the purpose of this procedure is the aspect name, which may
-- be different from the pragma name (e.g. Precondition for Pre aspect).
-- In addition, 'Class aspects are recognized (and the corresponding
-- special names used in the processing).
-- the name of the aspect or pragma is not one of those recognized as
-- an assertion kind by an Assertion_Policy pragma, then the call has
-- no effect. Note that in the case of a pragma derived from an aspect,
-- the name we use for the purpose of this procedure is the aspect name,
-- which may be different from the pragma name (e.g. Precondition for
-- Pre aspect). In addition, 'Class aspects are recognized (and the
-- corresponding special names used in the processing).
--
-- If the name is valid ASSERTION_KIND name, then the Check_Policy pragma
-- If the name is a valid assertion kind name, then the Check_Policy pragma
-- chain is checked for a matching entry (or for an Assertion entry which
-- matches all possibilities). If a matching entry is found then the policy
-- is checked. If it is Off, Ignore, or Disable, then the Is_Ignored flag
......
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