[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Mon, 22 Apr 2013 10:42:42 +0000 (12:42 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 22 Apr 2013 10:42:42 +0000 (12:42 +0200)
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

gcc/ada/ChangeLog
gcc/ada/exp_util.adb
gcc/ada/gnat_rm.texi
gcc/ada/opt.ads
gcc/ada/par-ch2.adb
gcc/ada/prj-nmsc.adb
gcc/ada/sem_ch13.adb
gcc/ada/sem_prag.adb
gcc/ada/sem_prag.ads

index 5c02323a6b5379e136201f7b5a01616672663a6c..1b2d967de290f48e2b5249988c9278ae34d70106 100644 (file)
@@ -1,3 +1,17 @@
+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,
index 79b9d372afa95f5bad1f05a3010836bf909688a9..aa40b3d56e4a984a637c613b6003befabc29abae 100644 (file)
@@ -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;
index 9c063c63f832443b4226aedaa64983b0cee0549b..a70a78dec6c3cc9902d720867f22edf3062a2438 100644 (file)
@@ -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
index bbf6e295270808b8026ef116326b94d0f57a5c4e..7473a5c11e65acb959fd8be4e1c5bd56f7ed8aca 100644 (file)
@@ -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
index e8d6a9cd2276b5aa09bf48dfb161bc7a24eda96d..224c63b7eb9b2c3d847a9a190f805c058a2a621a 100644 (file)
@@ -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
index 751dab8dd0817c95f98cf86338330a081b318340..1ead9365e5b02d820457bbad2a0b730f38ede4b4 100644 (file)
@@ -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;
index 1eaaf5d650e49cc78cac22dad11e0be937cd4224..e100756496bd73f892106ec2be90edded9e061c1 100644 (file)
@@ -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
 
index 1cff29ff6de1f8f099b4af3076323c28b2892952..bc1c63b8a3ff95658a41ecc6a22ece9a10556403 100644 (file)
@@ -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;
index 38e39ed2f8a2337e6c947c238f91ddfe2e3439de..8d0d53d5c401903c7b61416dafbb57945d4052a0 100644 (file)
@@ -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