diff options
author | Thomas Quinot <quinot@adacore.com> | 2010-06-21 13:38:58 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-06-21 15:38:58 +0200 |
commit | a548f9ffabe114aa611bf69c6dfdb5afce20bbd1 (patch) | |
tree | 650b744da62c5c3827dabe350052202fdacae7c8 /gcc | |
parent | 5a153b2787e167cb9f065e6fd91424b0475b2790 (diff) | |
download | gcc-a548f9ffabe114aa611bf69c6dfdb5afce20bbd1.zip gcc-a548f9ffabe114aa611bf69c6dfdb5afce20bbd1.tar.gz gcc-a548f9ffabe114aa611bf69c6dfdb5afce20bbd1.tar.bz2 |
checks.adb: Add comments.
2010-06-21 Thomas Quinot <quinot@adacore.com>
* checks.adb: Add comments.
* prj-nmsc.adb: Minor reformatting.
From-SVN: r161077
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/checks.adb | 7 | ||||
-rw-r--r-- | gcc/ada/prj-nmsc.adb | 22 |
3 files changed, 23 insertions, 11 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 30a6f60..7652484 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -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, diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index ebe6e5a..f4a339f 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -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; diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb index 9e114f6..ecfa4ce 100644 --- a/gcc/ada/prj-nmsc.adb +++ b/gcc/ada/prj-nmsc.adb @@ -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 |