Commit fb25a60d by Arnaud Charlet

[multiple changes]

2009-08-07  Robert Dewar  <dewar@adacore.com>

	* types.ads: Minor reformatting
	* sem_ch12.ads (Check_Generic_Child_Unit): Add missing documentation.
	* frontend.adb, sem_warn.adb, sem_warn.ads: Fix spelling of
	Output_Non_Modified_In_Out_Warnings.
	* sem_ch13.adb: Remove ??? comment.

2009-08-07  Vincent Celier  <celier@adacore.com>

	* mlib-prj.adb (Build_Library): Include binder generate object file
	for SAL when library name is only one character.

From-SVN: r150563
parent 0a69df7c
2009-08-07 Robert Dewar <dewar@adacore.com>
* types.ads: Minor reformatting
* sem_ch12.ads (Check_Generic_Child_Unit): Add missing documentation.
* frontend.adb, sem_warn.adb, sem_warn.ads: Fix spelling of
Output_Non_Modified_In_Out_Warnings.
* sem_ch13.adb: Remove ??? comment.
2009-08-07 Vincent Celier <celier@adacore.com>
* mlib-prj.adb (Build_Library): Include binder generate object file
for SAL when library name is only one character.
2009-08-07 Thomas Quinot <quinot@adacore.com> 2009-08-07 Thomas Quinot <quinot@adacore.com>
* targparm.adb: Minor reformatting * targparm.adb: Minor reformatting
......
...@@ -351,7 +351,7 @@ begin ...@@ -351,7 +351,7 @@ begin
-- Output waiting warning messages -- Output waiting warning messages
Sem_Warn.Output_Non_Modifed_In_Out_Warnings; Sem_Warn.Output_Non_Modified_In_Out_Warnings;
Sem_Warn.Output_Unreferenced_Messages; Sem_Warn.Output_Unreferenced_Messages;
Sem_Warn.Check_Unused_Withs; Sem_Warn.Check_Unused_Withs;
Sem_Warn.Output_Unused_Warnings_Off_Warnings; Sem_Warn.Output_Unused_Warnings_Off_Warnings;
......
...@@ -1337,18 +1337,23 @@ package body MLib.Prj is ...@@ -1337,18 +1337,23 @@ package body MLib.Prj is
Foreign_Sources := For_Project.Languages.Next /= null; Foreign_Sources := For_Project.Languages.Next /= null;
Current_Proj := For_Project; Current_Proj := For_Project;
loop loop
if Current_Proj.Object_Directory /= No_Path_Information then if Current_Proj.Object_Directory /= No_Path_Information then
-- The following code gets far too indented, I suggest some
-- procedural abstraction here. How about making this declare
-- block a named procedure???
declare declare
Object_Dir_Path : constant String := Object_Dir_Path : constant String :=
Get_Name_String Get_Name_String
(Current_Proj.Object_Directory (Current_Proj.Object_Directory
.Display_Name); .Display_Name);
Object_Dir : Dir_Type;
Filename : String (1 .. 255); Object_Dir : Dir_Type;
Last : Natural; Filename : String (1 .. 255);
Id : Name_Id; Last : Natural;
Id : Name_Id;
begin begin
Open (Dir => Object_Dir, Dir_Name => Object_Dir_Path); Open (Dir => Object_Dir, Dir_Name => Object_Dir_Path);
...@@ -1364,11 +1369,12 @@ package body MLib.Prj is ...@@ -1364,11 +1369,12 @@ package body MLib.Prj is
if Is_Obj (Filename (1 .. Last)) then if Is_Obj (Filename (1 .. Last)) then
declare declare
Object_Path : constant String := Object_Path : constant String :=
Normalize_Pathname Normalize_Pathname
(Object_Dir_Path & (Object_Dir_Path
Directory_Separator & & Directory_Separator
Filename (1 .. Last)); & Filename (1 .. Last));
C_Object_Path : String := Object_Path; C_Object_Path : String := Object_Path;
C_Filename : String := Filename (1 .. Last); C_Filename : String := Filename (1 .. Last);
...@@ -1395,21 +1401,27 @@ package body MLib.Prj is ...@@ -1395,21 +1401,27 @@ package body MLib.Prj is
Ext_To Ext_To
(C_Filename (C_Filename
(1 .. Last), "ali"); (1 .. Last), "ali");
ALI_Path : constant String := ALI_Path : constant String :=
Ext_To (C_Object_Path, "ali"); Ext_To (C_Object_Path, "ali");
Add_It : Boolean :=
Foreign_Sources Add_It : Boolean;
or else Fname : File_Name_Type;
(Last > 5 Proj : Project_Id;
and then Index : Unit_Index;
C_Filename
(1 .. B_Start'Length) =
B_Start.all);
Fname : File_Name_Type;
Proj : Project_Id;
Index : Unit_Index;
begin begin
-- The following assignment could use
-- a comment ???
Add_It :=
Foreign_Sources
or else
(Last >= 5
and then
C_Filename (1 .. B_Start'Length)
= B_Start.all);
if Is_Regular_File (ALI_Path) then if Is_Regular_File (ALI_Path) then
-- If there is an ALI file, check if -- If there is an ALI file, check if
...@@ -1419,8 +1431,9 @@ package body MLib.Prj is ...@@ -1419,8 +1431,9 @@ package body MLib.Prj is
-- the library. -- the library.
if not Add_It then if not Add_It then
Index := Units_Htable.Get_First Index :=
(In_Tree.Units_HT); Units_Htable.Get_First
(In_Tree.Units_HT);
while Index /= null loop while Index /= null loop
if Index.File_Names (Impl) /= if Index.File_Names (Impl) /=
null null
...@@ -1472,8 +1485,9 @@ package body MLib.Prj is ...@@ -1472,8 +1485,9 @@ package body MLib.Prj is
exit when Add_It; exit when Add_It;
Index := Units_Htable.Get_Next Index :=
(In_Tree.Units_HT); Units_Htable.Get_Next
(In_Tree.Units_HT);
end loop; end loop;
end if; end if;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2008, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -47,12 +47,14 @@ package Sem_Ch12 is ...@@ -47,12 +47,14 @@ package Sem_Ch12 is
procedure Check_Generic_Child_Unit procedure Check_Generic_Child_Unit
(Gen_Id : Node_Id; (Gen_Id : Node_Id;
Parent_Installed : in out Boolean); Parent_Installed : in out Boolean);
-- If the name of the generic unit in an instantiation or a renaming -- If the name of the generic unit in an instantiation or a renaming is a
-- is a selected component, then the prefix may be an instance and the -- selected component, then the prefix may be an instance and the selector
-- selector may designate a child unit. Retrieve the parent generic -- may designate a child unit. Retrieve the parent generic and search for
-- and search for the child unit that must be declared within. Similarly, -- the child unit that must be declared within. Similarly, if this is the
-- if this is the name of a generic child unit within an instantiation of -- name of a generic child unit within an instantiation of its own parent,
-- its own parent, retrieve the parent generic. -- retrieve the parent generic. If the parent is installed as a result of
-- this call, then Parent_Installed is set True, otherwise Parent_Intalled
-- is unchanged by the call.
function Copy_Generic_Node function Copy_Generic_Node
(N : Node_Id; (N : Node_Id;
......
...@@ -2202,11 +2202,6 @@ package body Sem_Ch13 is ...@@ -2202,11 +2202,6 @@ package body Sem_Ch13 is
-- Analyze_Freeze_Entity -- -- Analyze_Freeze_Entity --
--------------------------- ---------------------------
-- This does not belong in sem_ch13, and I don't like the big new
-- dependency on sem_ch3, I would in fact move this to sem_ch3 or
-- somewhere else, and then Add_Internal_Interface_Entitites can be
-- private to sem_ch3.adb. ???
procedure Analyze_Freeze_Entity (N : Node_Id) is procedure Analyze_Freeze_Entity (N : Node_Id) is
E : constant Entity_Id := Entity (N); E : constant Entity_Id := Entity (N);
......
...@@ -2603,7 +2603,7 @@ package body Sem_Warn is ...@@ -2603,7 +2603,7 @@ package body Sem_Warn is
-- Output_Non_Modified_In_Out_Warnings -- -- Output_Non_Modified_In_Out_Warnings --
----------------------------------------- -----------------------------------------
procedure Output_Non_Modifed_In_Out_Warnings is procedure Output_Non_Modified_In_Out_Warnings is
function No_Warn_On_In_Out (E : Entity_Id) return Boolean; function No_Warn_On_In_Out (E : Entity_Id) return Boolean;
-- Given a formal parameter entity E, determines if there is a reason to -- Given a formal parameter entity E, determines if there is a reason to
...@@ -2700,7 +2700,7 @@ package body Sem_Warn is ...@@ -2700,7 +2700,7 @@ package body Sem_Warn is
end if; end if;
end; end;
end loop; end loop;
end Output_Non_Modifed_In_Out_Warnings; end Output_Non_Modified_In_Out_Warnings;
---------------------------------------- ----------------------------------------
-- Output_Obsolescent_Entity_Warnings -- -- Output_Obsolescent_Entity_Warnings --
......
...@@ -138,7 +138,7 @@ package Sem_Warn is ...@@ -138,7 +138,7 @@ package Sem_Warn is
-- Output Routines -- -- Output Routines --
--------------------- ---------------------
procedure Output_Non_Modifed_In_Out_Warnings; procedure Output_Non_Modified_In_Out_Warnings;
-- Warnings about IN OUT parameters that could be IN are collected till -- Warnings about IN OUT parameters that could be IN are collected till
-- the end of the compilation process (see body of this routine for a -- the end of the compilation process (see body of this routine for a
-- discussion of why this is done). This procedure outputs the warnings. -- discussion of why this is done). This procedure outputs the warnings.
......
...@@ -196,8 +196,8 @@ package Types is ...@@ -196,8 +196,8 @@ package Types is
-- which are one greater than the previous upper bound. -- which are one greater than the previous upper bound.
subtype Big_Source_Buffer is Text_Buffer (0 .. Text_Ptr'Last); subtype Big_Source_Buffer is Text_Buffer (0 .. Text_Ptr'Last);
-- This is a virtual type used as the designated type of the access -- This is a virtual type used as the designated type of the access type
-- type Source_Buffer_Ptr, see Osint.Read_Source_File for details. -- Source_Buffer_Ptr, see Osint.Read_Source_File for details.
type Source_Buffer_Ptr is access all Big_Source_Buffer; type Source_Buffer_Ptr is access all Big_Source_Buffer;
for Source_Buffer_Ptr'Storage_Size use 0; for Source_Buffer_Ptr'Storage_Size use 0;
...@@ -234,8 +234,8 @@ package Types is ...@@ -234,8 +234,8 @@ package Types is
-- Used for all nodes in the presentation of package Standard.ASCII -- Used for all nodes in the presentation of package Standard.ASCII
System_Location : constant Source_Ptr := -4; System_Location : constant Source_Ptr := -4;
-- Used to identify locations of pragmas scanned by Targparm, where we -- Used to identify locations of pragmas scanned by Targparm, where we know
-- know the location is in System, but we don't know exactly what line. -- the location is in System, but we don't know exactly what line.
First_Source_Ptr : constant Source_Ptr := 0; First_Source_Ptr : constant Source_Ptr := 0;
-- Starting source pointer index value for first source program -- Starting source pointer index value for first source program
......
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