From 03e3a723257e49661df9511a349b6b2f2f0747a9 Mon Sep 17 00:00:00 2001 From: charlet Date: Thu, 25 Mar 2004 15:59:29 +0000 Subject: 2004-03-25 Vasiliy Fofanov * memtrack.adb: Log realloc calls, which are treated as free followed by alloc. 2004-03-25 Vincent Celier * prj-makr.adb (Process_Directories): Detect when a file contains several units. Do not include such files in the config pragmas or in the naming scheme. * prj-nmsc.adb (Record_Source): New parameter Trusted_Mode. Resolve links only when not in Trusted_Mode. (Find_Sources, Recursive_Find_Dirs, Find_Source_Dirs, Locate_Directory): Do not resolve links for the display names. * prj-part.adb (Parse_Single_Project, Project_Path_Name_Of): Do not resolve links when computing the display names. 2004-03-25 Thomas Quinot * sem_attr.adb (Check_Dereference): When the prefix of a 'Tag attribute reference does not denote a subtype, it can be any expression that has a classwide type, potentially after an implicit dereference. In particular, the prefix can be a view conversion for a classwide type (for which Is_Object_Reference holds), but it can also be a value conversion for an access-to-classwide type. In the latter case, there is an implicit dereference, and the original node for the prefix does not verify Is_Object_Reference. * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): A view conversion of a discriminant-dependent component of a mutable object is one itself. 2004-03-25 Ed Schonberg * freeze.adb (Freeze_Entity): When an inherited subprogram is inherited, has convention C, and has unconstrained array parameters, place the corresponding warning on the derived type declaration rather than the original subprogram. * sem_ch12.adb (Instantiate_Formal_Subprogram): Set From_Default indication on renaming declaration, if formal has a box and actual is absent. * sem_ch8.adb (Analyze_Subprogram_Renaming): Use From_Default flag to determine whether to generate an implicit or explicit reference to the renamed entity. * sinfo.ads, sinfo.adb: New flag From_Default, to indicate that a subprogram renaming comes from a defaulted formal subprogram in an instance. 2004-03-25 Gary Dismukes * sem_elab.adb (Check_Elab_Call): Refine loop that checks for default value expressions to ensure that calls within a component definition will be checked (since those are evaluated during the record type's elaboration). 2004-03-25 Arnaud Charlet * s-tpobop.adb: Code clean up: (Requeue_Call): Extract from PO_Service_Entries to remove duplicated code. (PO_Do_Or_Queue): Remove duplicated code and use Requeue_Call. 2004-03-25 Jose Ruiz * Makefile.in: Clean up in the ravenscar run time. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79953 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/prj-nmsc.adb | 70 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 55 insertions(+), 15 deletions(-) (limited to 'gcc/ada/prj-nmsc.adb') diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb index 51d5e0e8253..5b09f849127 100644 --- a/gcc/ada/prj-nmsc.adb +++ b/gcc/ada/prj-nmsc.adb @@ -136,7 +136,8 @@ package body Prj.Nmsc is Data : in out Project_Data; Location : Source_Ptr; Current_Source : in out String_List_Id; - Source_Recorded : in out Boolean); + Source_Recorded : in out Boolean; + Trusted_Mode : Boolean); -- Put a unit in the list of units of a project, if the file name -- corresponds to a valid unit name. @@ -703,7 +704,8 @@ package body Prj.Nmsc is (Name => Name_Buffer (1 .. Name_Len), Directory => Source_Directory (Source_Directory'First .. Dir_Last), - Resolve_Links => not Trusted_Mode); + Resolve_Links => False, + Case_Sensitive => True); Path_Name : Name_Id; begin @@ -725,7 +727,8 @@ package body Prj.Nmsc is Data => Data, Location => No_Location, Current_Source => Current_Source, - Source_Recorded => Source_Recorded); + Source_Recorded => Source_Recorded, + Trusted_Mode => Trusted_Mode); end if; end; end loop; @@ -841,7 +844,8 @@ package body Prj.Nmsc is Data => Data, Location => NL.Location, Current_Source => Current_Source, - Source_Recorded => Source_Recorded); + Source_Recorded => Source_Recorded, + Trusted_Mode => Trusted_Mode); end if; end loop; @@ -2591,7 +2595,7 @@ package body Prj.Nmsc is The_Path : constant String := Normalize_Pathname (Get_Name_String (Path)) & - Directory_Separator; + Directory_Separator; The_Path_Last : constant Natural := Compute_Directory_Last (The_Path); @@ -2692,7 +2696,9 @@ package body Prj.Nmsc is (Name => Name (1 .. Last), Directory => The_Path - (The_Path'First .. The_Path_Last)); + (The_Path'First .. The_Path_Last), + Resolve_Links => False, + Case_Sensitive => True); begin if Is_Directory (Path_Name) then @@ -2761,7 +2767,9 @@ package body Prj.Nmsc is Normalize_Pathname (Name => Get_Name_String (Base_Dir), Directory => - Get_Name_String (Data.Display_Directory)); + Get_Name_String (Data.Display_Directory), + Resolve_Links => False, + Case_Sensitive => True); begin if Root_Dir'Length = 0 then @@ -3544,13 +3552,24 @@ package body Prj.Nmsc is if Is_Directory (The_Name) then declare Normed : constant String := - Normalize_Pathname (The_Name); + Normalize_Pathname + (The_Name, + Resolve_Links => False, + Case_Sensitive => True); + + Canonical_Path : constant String := + Normalize_Pathname + (Normed, + Resolve_Links => True, + Case_Sensitive => False); begin Name_Len := Normed'Length; Name_Buffer (1 .. Name_Len) := Normed; Display := Name_Find; - Canonical_Case_File_Name (Name_Buffer (1 .. Name_Len)); + + Name_Len := Canonical_Path'Length; + Name_Buffer (1 .. Name_Len) := Canonical_Path; Dir := Name_Find; end; end if; @@ -3565,13 +3584,24 @@ package body Prj.Nmsc is if Is_Directory (Full_Path) then declare Normed : constant String := - Normalize_Pathname (Full_Path); + Normalize_Pathname + (Full_Path, + Resolve_Links => False, + Case_Sensitive => True); + + Canonical_Path : constant String := + Normalize_Pathname + (Normed, + Resolve_Links => True, + Case_Sensitive => False); begin Name_Len := Normed'Length; Name_Buffer (1 .. Name_Len) := Normed; Display := Name_Find; - Canonical_Case_File_Name (Name_Buffer (1 .. Name_Len)); + + Name_Len := Canonical_Path'Length; + Name_Buffer (1 .. Name_Len) := Canonical_Path; Dir := Name_Find; end; end if; @@ -3637,7 +3667,8 @@ package body Prj.Nmsc is Data : in out Project_Data; Location : Source_Ptr; Current_Source : in out String_List_Id; - Source_Recorded : in out Boolean) + Source_Recorded : in out Boolean; + Trusted_Mode : Boolean) is Canonical_File_Name : Name_Id; Canonical_Path_Name : Name_Id; @@ -3655,9 +3686,18 @@ package body Prj.Nmsc is Get_Name_String (File_Name); Canonical_Case_File_Name (Name_Buffer (1 .. Name_Len)); Canonical_File_Name := Name_Find; - Get_Name_String (Path_Name); - Canonical_Case_File_Name (Name_Buffer (1 .. Name_Len)); - Canonical_Path_Name := Name_Find; + + declare + Canonical_Path : constant String := + Normalize_Pathname + (Get_Name_String (Path_Name), + Resolve_Links => not Trusted_Mode, + Case_Sensitive => False); + begin + Name_Len := 0; + Add_Str_To_Name_Buffer (Canonical_Path); + Canonical_Path_Name := Name_Find; + end; -- Find out the unit name, the unit kind and if it needs -- a specific SFN pragma. -- cgit v1.2.1