aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-08-07 11:42:01 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-08-07 11:42:01 +0200
commitfb25a60d960ea0b6edf4c17ecf2e4aaf23aefe72 (patch)
treeaaaf0e779192c7a44b2f20a6ed2313a8eaea7d89
parent0a69df7c0ed3cf749e9b6e87f5fa14e01553e525 (diff)
downloadgcc-fb25a60d960ea0b6edf4c17ecf2e4aaf23aefe72.zip
gcc-fb25a60d960ea0b6edf4c17ecf2e4aaf23aefe72.tar.gz
gcc-fb25a60d960ea0b6edf4c17ecf2e4aaf23aefe72.tar.bz2
[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
-rw-r--r--gcc/ada/ChangeLog13
-rw-r--r--gcc/ada/frontend.adb2
-rw-r--r--gcc/ada/mlib-prj.adb64
-rw-r--r--gcc/ada/sem_ch12.ads16
-rw-r--r--gcc/ada/sem_ch13.adb5
-rw-r--r--gcc/ada/sem_warn.adb4
-rw-r--r--gcc/ada/sem_warn.ads2
-rw-r--r--gcc/ada/types.ads8
8 files changed, 69 insertions, 45 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index eb2e98b..5c162f5 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,16 @@
+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
diff --git a/gcc/ada/frontend.adb b/gcc/ada/frontend.adb
index 581d977..3285acc 100644
--- a/gcc/ada/frontend.adb
+++ b/gcc/ada/frontend.adb
@@ -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;
diff --git a/gcc/ada/mlib-prj.adb b/gcc/ada/mlib-prj.adb
index 6f9b371..f15b7c0 100644
--- a/gcc/ada/mlib-prj.adb
+++ b/gcc/ada/mlib-prj.adb
@@ -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;
diff --git a/gcc/ada/sem_ch12.ads b/gcc/ada/sem_ch12.ads
index c3b3417..a794637 100644
--- a/gcc/ada/sem_ch12.ads
+++ b/gcc/ada/sem_ch12.ads
@@ -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;
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index d76475f..6542dd2 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -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);
diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
index e917ccf..33da3b4 100644
--- a/gcc/ada/sem_warn.adb
+++ b/gcc/ada/sem_warn.adb
@@ -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 --
diff --git a/gcc/ada/sem_warn.ads b/gcc/ada/sem_warn.ads
index 1e0f968..4ab97be 100644
--- a/gcc/ada/sem_warn.ads
+++ b/gcc/ada/sem_warn.ads
@@ -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.
diff --git a/gcc/ada/types.ads b/gcc/ada/types.ads
index 714018d..7340f64 100644
--- a/gcc/ada/types.ads
+++ b/gcc/ada/types.ads
@@ -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