OSDN Git Service

2010-06-21 Thomas Quinot <quinot@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Jun 2010 13:38:58 +0000 (13:38 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Jun 2010 13:38:58 +0000 (13:38 +0000)
* checks.adb: Add comments.
* prj-nmsc.adb: Minor reformatting.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161077 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/checks.adb
gcc/ada/prj-nmsc.adb

index 30a6f60..7652484 100644 (file)
@@ -1,5 +1,10 @@
 2010-06-21  Thomas Quinot  <quinot@adacore.com>
 
+       * checks.adb: Add comments.
+       * prj-nmsc.adb: Minor reformatting.
+
+2010-06-21  Thomas Quinot  <quinot@adacore.com>
+
        * sem_ch9.adb, checks.adb, sem_util.adb, sem_util.ads, sem_res.adb,
        sem_attr.adb (Get_E_First_Or_Last): Use attribute references on E to
        extract bounds, to ensure that we get the proper captured values,
index ebe6e5a..f4a339f 100644 (file)
@@ -6253,8 +6253,13 @@ package body Checks is
          E    : Entity_Id;
          Indx : Nat;
          Nam  : Name_Id) return Node_Id;
-      --  Returns expression to compute:
+      --  Returns an attribute reference
       --    E'First or E'Last
+      --  with a source location of Loc.
+      --  Nam is Name_First or Name_Last, according to which attribute is
+      --  desired. If Indx is non-zero, it is passed as a literal in the
+      --  Expressions of the attribute reference (identifying the desired
+      --  array dimension).
 
       function Get_N_First (N : Node_Id; Indx : Nat) return Node_Id;
       function Get_N_Last  (N : Node_Id; Indx : Nat) return Node_Id;
index 9e114f6..ecfa4ce 100644 (file)
@@ -6835,22 +6835,24 @@ package body Prj.Nmsc is
             Num_Nod := Data.Tree.Number_Lists.Table (Src_Dir_Rank);
             Element := Data.Tree.String_Elements.Table (Source_Dir);
 
+            --  Use Element.Value in this test, not Display_Value, because we
+            --  want the symbolic links to be resolved when appropriate.
+
             if Element.Value /= No_Name then
                declare
-                  --  We use Element.Value, not Display_Value, because we want
-                  --  the symbolic links to be resolved when appropriate.
-                  Source_Directory         : constant String :=
-                                               Get_Name_String (Element.Value)
-                                                 & Directory_Separator;
-                  Dir_Last                 : constant Natural :=
-                                               Compute_Directory_Last
-                                                 (Source_Directory);
-                  --  The Display_Source_Directory is to be able to open an
-                  --  UTF-8 encoded directory on Windows.
+                  Source_Directory : constant String :=
+                                       Get_Name_String (Element.Value)
+                                         & Directory_Separator;
+
+                  Dir_Last : constant Natural :=
+                               Compute_Directory_Last (Source_Directory);
+
                   Display_Source_Directory : constant String :=
                                                Get_Name_String
                                                  (Element.Display_Value)
                                                   & Directory_Separator;
+                  --  Display_Source_Directory is to allow us to open a UTF-8
+                  --  encoded directory on Windows.
 
                begin
                   if Current_Verbosity = High then