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> 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, * 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 snames.ads-tmpl, sinfo.ads, sem_util.ads: Remove all references to
Pragma_Contract_Case and Name_Contract_Case. Pragma_Contract_Case and Name_Contract_Case.
......
...@@ -5589,7 +5589,7 @@ package body Exp_Util is ...@@ -5589,7 +5589,7 @@ package body Exp_Util is
begin begin
-- Compute proper name to use, we need to get this right so that the -- 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 if Has_Dynamic_Predicate_Aspect (Typ) then
Nam := Name_Dynamic_Predicate; Nam := Name_Dynamic_Predicate;
......
...@@ -1235,7 +1235,7 @@ Syntax: ...@@ -1235,7 +1235,7 @@ Syntax:
@smallexample @c ada @smallexample @c ada
pragma Assertion_Policy (CHECK | DISABLE | IGNORE); pragma Assertion_Policy (CHECK | DISABLE | IGNORE);
Pragma Assertion_Policy ( pragma Assertion_Policy (
ASSERTION_KIND => POLICY_IDENTIFIER ASSERTION_KIND => POLICY_IDENTIFIER
@{, ASSERTION_KIND => POLICY_IDENTIFIER@}); @{, ASSERTION_KIND => POLICY_IDENTIFIER@});
...@@ -1443,7 +1443,10 @@ pragma Check ( ...@@ -1443,7 +1443,10 @@ pragma Check (
[, [Message =>] string_EXPRESSION] ); [, [Message =>] string_EXPRESSION] );
CHECK_KIND ::= IDENTIFIER | CHECK_KIND ::= IDENTIFIER |
Pre'Class | Post'Class | Type_Invariant'Class Pre'Class |
Post'Class |
Type_Invariant'Class |
Invariant'Class
@end smallexample @end smallexample
@noindent @noindent
...@@ -1557,7 +1560,7 @@ pragma Check_Policy ...@@ -1557,7 +1560,7 @@ pragma Check_Policy
([Name =>] CHECK_KIND, ([Name =>] CHECK_KIND,
[Policy =>] POLICY_IDENTIFIER); [Policy =>] POLICY_IDENTIFIER);
Pragma Check_Policy ( pragma Check_Policy (
CHECK_KIND => POLICY_IDENTIFIER CHECK_KIND => POLICY_IDENTIFIER
@{, 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 ...@@ -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. are allowed by @code{Assertion_Policy}, then the effect is identical.
If the first argument is Debug, then the policy applies to Debug pragmas, 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 disabling their effect if the policy is @code{OFF}, @code{DISABLE}, or
@code{Ignore}, and allowing them to execute with normal semantics if @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 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 @code{DISABLE}, then the procedure call in @code{Debug} pragmas will
be totally ignored and not analyzed semanticslly. be totally ignored and not analyzed semantically.
Finally the first argument may be some other identifier than the above 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: that can be checked using pragma @code{Check}. For example, if the pragma:
@smallexample @c ada @smallexample @c ada
......
...@@ -301,7 +301,7 @@ package Opt is ...@@ -301,7 +301,7 @@ package Opt is
-- terminated by Empty. The order is most recently processed first. Note -- 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 -- that Push_Scope and Pop_Scope in Sem_Ch8 save and restore the value
-- of this variable, implementing the required scope control for pragmas -- of this variable, implementing the required scope control for pragmas
-- appearing a declarative part. -- appearing in a declarative part.
Check_Readonly_Files : Boolean := False; Check_Readonly_Files : Boolean := False;
-- GNATMAKE -- GNATMAKE
......
...@@ -459,7 +459,7 @@ package body Ch2 is ...@@ -459,7 +459,7 @@ package body Ch2 is
-- | [pragma_argument_ASPECT_MARK =>] EXPRESSION -- | [pragma_argument_ASPECT_MARK =>] EXPRESSION
-- where the interesting allowed cases (which do not fit the syntax of the -- where the interesting allowed cases (which do not fit the syntax of the
-- first alternative above are -- first alternative above) are
-- ASPECT_MARK ::= -- ASPECT_MARK ::=
-- Pre'Class | Post'Class | Invariant'Class | Type_Invariant'Class -- Pre'Class | Post'Class | Invariant'Class | Type_Invariant'Class
......
...@@ -3166,9 +3166,10 @@ package body Prj.Nmsc is ...@@ -3166,9 +3166,10 @@ package body Prj.Nmsc is
(Data.Flags, (Data.Flags,
"library directory { does not exist", "library directory { does not exist",
Lib_Dir.Location, Project); Lib_Dir.Location, Project);
end if;
else
Project.Library_Dir := No_Path_Information; Project.Library_Dir := No_Path_Information;
end if;
-- Checks for object/source directories -- Checks for object/source directories
...@@ -5421,10 +5422,10 @@ package body Prj.Nmsc is ...@@ -5421,10 +5422,10 @@ package body Prj.Nmsc is
(Data.Flags, Data.Flags.Require_Obj_Dirs, (Data.Flags, Data.Flags.Require_Obj_Dirs,
"object directory { not found", "object directory { not found",
Project.Location, Project); Project.Location, Project);
end if;
else
Project.Object_Directory := No_Path_Information; Project.Object_Directory := No_Path_Information;
end if;
end if; end if;
end if; end if;
...@@ -5502,12 +5503,13 @@ package body Prj.Nmsc is ...@@ -5502,12 +5503,13 @@ package body Prj.Nmsc is
Error_Or_Warning Error_Or_Warning
(Data.Flags, Data.Flags.Missing_Source_Files, (Data.Flags, Data.Flags.Missing_Source_Files,
"exec directory { not found", Project.Location, Project); "exec directory { not found", Project.Location, Project);
end if;
else
Project.Exec_Directory := No_Path_Information; Project.Exec_Directory := No_Path_Information;
end if; end if;
end if; end if;
end if; end if;
end if;
if Current_Verbosity = High then if Current_Verbosity = High then
if Project.Exec_Directory = No_Path_Information then if Project.Exec_Directory = No_Path_Information then
......
...@@ -7467,7 +7467,7 @@ package body Sem_Prag is ...@@ -7467,7 +7467,7 @@ package body Sem_Prag is
-- Type_Invariant | -- Type_Invariant |
-- Type_Invariant'Class -- Type_Invariant'Class
-- ID_ASSERTION_KIND ::= Assert_And_Cut } -- ID_ASSERTION_KIND ::= Assert_And_Cut |
-- Assume | -- Assume |
-- Contract_Cases | -- Contract_Cases |
-- Debug | -- Debug |
...@@ -7490,11 +7490,11 @@ package body Sem_Prag is ...@@ -7490,11 +7490,11 @@ package body Sem_Prag is
-- the corresponding assertion. If Disable is specified, then the -- the corresponding assertion. If Disable is specified, then the
-- argument of the assertion is not even analyzed. This is useful -- argument of the assertion is not even analyzed. This is useful
-- when the aspect/pragma argument references entities in a with'ed -- 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, -- Note: the attribute forms Pre'Class, Post'Class, Invariant'Class,
-- and Type_Invariant'Class were recognized by the parser and -- 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 -- _Pre, _Post, _Invariant, and _Type_Invariant, so no special
-- processing is required here. -- processing is required here.
...@@ -7513,9 +7513,9 @@ package body Sem_Prag is ...@@ -7513,9 +7513,9 @@ package body Sem_Prag is
if Is_Configuration_Pragma then if Is_Configuration_Pragma then
null; null;
-- It can also appear in a declaration or package spec in Ada -- 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 -- 2012 mode. We allow this in other modes, but in that case we
-- we consider that we have an Ada 2012 pragma on our hands. -- consider that we have an Ada 2012 pragma on our hands.
else else
Check_Is_In_Decl_Part_Or_Package_Spec; Check_Is_In_Decl_Part_Or_Package_Spec;
...@@ -8338,8 +8338,8 @@ package body Sem_Prag is ...@@ -8338,8 +8338,8 @@ package body Sem_Prag is
-- For the new syntax, what we do is to convert each argument to -- 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 -- 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 -- old style Check_Policy pragmas for the search (we don't want
-- to deal with multiple arguments in the search) -- to have to deal with multiple arguments in the search.)
else else
declare declare
......
...@@ -75,15 +75,15 @@ package Sem_Prag is ...@@ -75,15 +75,15 @@ package Sem_Prag is
procedure Check_Applicable_Policy (N : Node_Id); procedure Check_Applicable_Policy (N : Node_Id);
-- N is either an N_Aspect or an N_Pragma node. There are two cases. If -- 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 -- the name of the aspect or pragma is not one of those recognized as
-- assertion kind by an Assertion_Kind pragma, then the call has no effect. -- an assertion kind by an Assertion_Policy pragma, then the call has
-- Note that in the case of a pragma derived from an aspect, the name -- no effect. Note that in the case of a pragma derived from an aspect,
-- we use for the purpose of this procedure is the aspect name, which may -- the name we use for the purpose of this procedure is the aspect name,
-- be different from the pragma name (e.g. Precondition for Pre aspect). -- which may be different from the pragma name (e.g. Precondition for
-- In addition, 'Class aspects are recognized (and the corresponding -- Pre aspect). In addition, 'Class aspects are recognized (and the
-- special names used in the processing). -- 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 -- 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 -- 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 -- 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