aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch10.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_ch10.adb')
-rw-r--r--gcc/ada/sem_ch10.adb50
1 files changed, 28 insertions, 22 deletions
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb
index b790a93..346cbf3 100644
--- a/gcc/ada/sem_ch10.adb
+++ b/gcc/ada/sem_ch10.adb
@@ -178,7 +178,7 @@ package body Sem_Ch10 is
-- analysis (should it appear otherwise in the context).
procedure Remove_Context_Clauses (N : Node_Id);
- -- Subsidiary of previous one. Remove use_ and with_clauses.
+ -- Subsidiary of previous one. Remove use_ and with_clauses
procedure Remove_Limited_With_Clause (N : Node_Id);
-- Remove from visibility the shadow entities introduced for a package
@@ -337,7 +337,7 @@ package body Sem_Ch10 is
Semantics (Lib_Unit);
Check_Unused_Withs (Get_Cunit_Unit_Number (Lib_Unit));
- -- Verify that the library unit is a package declaration.
+ -- Verify that the library unit is a package declaration
if Nkind (Unit (Lib_Unit)) /= N_Package_Declaration
and then
@@ -476,7 +476,7 @@ package body Sem_Ch10 is
if Is_Child_Spec (Unit_Node) then
- -- Set the entities of all parents in the program_unit_name.
+ -- Set the entities of all parents in the program_unit_name
Generate_Parent_References (
Unit_Node, Get_Parent_Entity (Unit (Parent_Spec (Unit_Node))));
@@ -864,7 +864,7 @@ package body Sem_Ch10 is
Next (Item);
end loop;
- -- Third pass: examine all limited_with clauses.
+ -- Third pass: examine all limited_with clauses
Item := First (Context_Items (N));
@@ -878,7 +878,7 @@ package body Sem_Ch10 is
& " package specification", Item);
end if;
- -- Skip analyzing with clause if no unit, see above.
+ -- Skip analyzing with clause if no unit, see above
if Present (Library_Unit (Item)) then
Analyze (Item);
@@ -905,7 +905,7 @@ package body Sem_Ch10 is
Nam : Entity_Id;
begin
- -- The package declaration must be in the current declarative part.
+ -- The package declaration must be in the current declarative part
Check_Stub_Level (N);
Nam := Current_Entity_In_Scope (Id);
@@ -1197,7 +1197,7 @@ package body Sem_Ch10 is
begin
Check_Stub_Level (N);
- -- First occurence of name may have been as an incomplete type.
+ -- First occurence of name may have been as an incomplete type
if Present (Nam) and then Ekind (Nam) = E_Incomplete_Type then
Nam := Full_View (Nam);
@@ -1484,7 +1484,7 @@ package body Sem_Ch10 is
begin
if not Is_Empty_List (Context_Items (N)) then
- -- Save current use clauses.
+ -- Save current use clauses
Remove_Scope;
Remove_Context (Lib_Unit);
@@ -1539,7 +1539,7 @@ package body Sem_Ch10 is
Re_Install_Use_Clauses;
Install_Context (N);
- -- Restore state of suppress flags for current body.
+ -- Restore state of suppress flags for current body
Scope_Suppress := Svg;
@@ -1568,7 +1568,7 @@ package body Sem_Ch10 is
begin
Check_Stub_Level (N);
- -- First occurence of name may have been as an incomplete type.
+ -- First occurence of name may have been as an incomplete type
if Present (Nam) and then Ekind (Nam) = E_Incomplete_Type then
Nam := Full_View (Nam);
@@ -1831,7 +1831,7 @@ package body Sem_Ch10 is
and then Present (System_Extend_Unit)
and then Present_System_Aux (N)
then
- -- If the extension is not present, an error will have been emitted.
+ -- If the extension is not present, an error will have been emitted
null;
end if;
@@ -1859,7 +1859,7 @@ package body Sem_Ch10 is
Sel : Node_Id;
procedure Decorate_Tagged_Type (T : Entity_Id);
- -- Set basic attributes of type, including its class_wide type.
+ -- Set basic attributes of type, including its class_wide type
function In_Chain (E : Entity_Id) return Boolean;
-- Check that the imported type is not already in the homonym chain,
@@ -1884,7 +1884,7 @@ package body Sem_Ch10 is
Set_Current_Entity (T);
end if;
- -- Build bogus class_wide type, if not previously done.
+ -- Build bogus class_wide type, if not previously done
if No (Class_Wide_Type (T)) then
CW := Make_Defining_Identifier (Loc, New_Internal_Name ('S'));
@@ -1999,7 +1999,7 @@ package body Sem_Ch10 is
if Nkind (Parent (P)) = N_Defining_Program_Unit_Name then
- -- Make parent packages visible.
+ -- Make parent packages visible
declare
Parent_Comp : Node_Id;
@@ -2149,7 +2149,7 @@ package body Sem_Ch10 is
Lib_Unit : constant Node_Id := Unit (N);
procedure Check_Parent_Context (U : Node_Id);
- -- Examine context items of parent unit to locate with_type clauses.
+ -- Examine context items of parent unit to locate with_type clauses
--------------------------
-- Check_Parent_Context --
@@ -2532,7 +2532,7 @@ package body Sem_Ch10 is
Withn : Node_Id;
function Build_Ancestor_Name (P : Node_Id) return Node_Id;
- -- Build prefix of child unit name. Recurse if needed.
+ -- Build prefix of child unit name. Recurse if needed
function Build_Unit_Name return Node_Id;
-- If the unit is a child unit, build qualified name with all
@@ -2657,7 +2657,7 @@ package body Sem_Ch10 is
then
if Limited_Present (Item) then
- -- Limited withed units will be installed later.
+ -- Limited withed units will be installed later
goto Continue;
@@ -4167,7 +4167,7 @@ package body Sem_Ch10 is
Lib_Unit : constant Node_Id := Unit (N);
begin
- -- If this is a child unit, first remove the parent units.
+ -- If this is a child unit, first remove the parent units
if Is_Child_Spec (Lib_Unit) then
Remove_Parents (Lib_Unit);
@@ -4394,7 +4394,11 @@ package body Sem_Ch10 is
P : Entity_Id;
procedure Unchain (E : Entity_Id);
- -- Remove entity from visibility list.
+ -- Remove entity from visibility list
+
+ -------------
+ -- Unchain --
+ -------------
procedure Unchain (E : Entity_Id) is
Prev : Entity_Id;
@@ -4424,13 +4428,15 @@ package body Sem_Ch10 is
end if;
end Unchain;
- -- Start of Remove_With_Type_Clause
+ -- Start of processing for Remove_With_Type_Clause
begin
if Nkind (Name) = N_Selected_Component then
Typ := Entity (Selector_Name (Name));
- if No (Typ) then -- error in declaration.
+ -- If no Typ, then error in declaration, ignore
+
+ if No (Typ) then
return;
end if;
else
@@ -4456,7 +4462,7 @@ package body Sem_Ch10 is
Set_From_With_Type (P, False);
- -- If P is a child unit, remove parents as well.
+ -- If P is a child unit, remove parents as well
P := Scope (P);