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>
* targparm.adb: Minor reformatting
......
......@@ -351,7 +351,7 @@ begin
-- 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.Check_Unused_Withs;
Sem_Warn.Output_Unused_Warnings_Off_Warnings;
......
......@@ -1337,18 +1337,23 @@ package body MLib.Prj is
Foreign_Sources := For_Project.Languages.Next /= null;
Current_Proj := For_Project;
loop
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
Object_Dir_Path : constant String :=
Get_Name_String
(Current_Proj.Object_Directory
.Display_Name);
Object_Dir : Dir_Type;
Filename : String (1 .. 255);
Last : Natural;
Id : Name_Id;
Object_Dir : Dir_Type;
Filename : String (1 .. 255);
Last : Natural;
Id : Name_Id;
begin
Open (Dir => Object_Dir, Dir_Name => Object_Dir_Path);
......@@ -1364,11 +1369,12 @@ package body MLib.Prj is
if Is_Obj (Filename (1 .. Last)) then
declare
Object_Path : constant String :=
Normalize_Pathname
(Object_Dir_Path &
Directory_Separator &
Filename (1 .. Last));
Object_Path : constant String :=
Normalize_Pathname
(Object_Dir_Path
& Directory_Separator
& Filename (1 .. Last));
C_Object_Path : String := Object_Path;
C_Filename : String := Filename (1 .. Last);
......@@ -1395,21 +1401,27 @@ package body MLib.Prj is
Ext_To
(C_Filename
(1 .. Last), "ali");
ALI_Path : constant String :=
Ext_To (C_Object_Path, "ali");
Add_It : Boolean :=
Foreign_Sources
or else
(Last > 5
and then
C_Filename
(1 .. B_Start'Length) =
B_Start.all);
Fname : File_Name_Type;
Proj : Project_Id;
Index : Unit_Index;
Add_It : Boolean;
Fname : File_Name_Type;
Proj : Project_Id;
Index : Unit_Index;
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 there is an ALI file, check if
......@@ -1419,8 +1431,9 @@ package body MLib.Prj is
-- the library.
if not Add_It then
Index := Units_Htable.Get_First
(In_Tree.Units_HT);
Index :=
Units_Htable.Get_First
(In_Tree.Units_HT);
while Index /= null loop
if Index.File_Names (Impl) /=
null
......@@ -1472,8 +1485,9 @@ package body MLib.Prj is
exit when Add_It;
Index := Units_Htable.Get_Next
(In_Tree.Units_HT);
Index :=
Units_Htable.Get_Next
(In_Tree.Units_HT);
end loop;
end if;
......
......@@ -6,7 +6,7 @@
-- --
-- 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 --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -47,12 +47,14 @@ package Sem_Ch12 is
procedure Check_Generic_Child_Unit
(Gen_Id : Node_Id;
Parent_Installed : in out Boolean);
-- If the name of the generic unit in an instantiation or a renaming
-- is a selected component, then the prefix may be an instance and the
-- selector may designate a child unit. Retrieve the parent generic
-- and search for the child unit that must be declared within. Similarly,
-- if this is the name of a generic child unit within an instantiation of
-- its own parent, retrieve the parent generic.
-- If the name of the generic unit in an instantiation or a renaming is a
-- selected component, then the prefix may be an instance and the selector
-- may designate a child unit. Retrieve the parent generic and search for
-- the child unit that must be declared within. Similarly, if this is the
-- name of a generic child unit within an instantiation of its own parent,
-- 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
(N : Node_Id;
......
......@@ -2202,11 +2202,6 @@ package body Sem_Ch13 is
-- 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
E : constant Entity_Id := Entity (N);
......
......@@ -2603,7 +2603,7 @@ package body Sem_Warn is
-- 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;
-- Given a formal parameter entity E, determines if there is a reason to
......@@ -2700,7 +2700,7 @@ package body Sem_Warn is
end if;
end;
end loop;
end Output_Non_Modifed_In_Out_Warnings;
end Output_Non_Modified_In_Out_Warnings;
----------------------------------------
-- Output_Obsolescent_Entity_Warnings --
......
......@@ -138,7 +138,7 @@ package Sem_Warn is
-- 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
-- the end of the compilation process (see body of this routine for a
-- discussion of why this is done). This procedure outputs the warnings.
......
......@@ -196,8 +196,8 @@ package Types is
-- which are one greater than the previous upper bound.
subtype Big_Source_Buffer is Text_Buffer (0 .. Text_Ptr'Last);
-- This is a virtual type used as the designated type of the access
-- type Source_Buffer_Ptr, see Osint.Read_Source_File for details.
-- This is a virtual type used as the designated type of the access type
-- Source_Buffer_Ptr, see Osint.Read_Source_File for details.
type Source_Buffer_Ptr is access all Big_Source_Buffer;
for Source_Buffer_Ptr'Storage_Size use 0;
......@@ -234,8 +234,8 @@ package Types is
-- Used for all nodes in the presentation of package Standard.ASCII
System_Location : constant Source_Ptr := -4;
-- Used to identify locations of pragmas scanned by Targparm, where we
-- know the location is in System, but we don't know exactly what line.
-- Used to identify locations of pragmas scanned by Targparm, where we know
-- the location is in System, but we don't know exactly what line.
First_Source_Ptr : constant Source_Ptr := 0;
-- 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