summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-21 09:41:45 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-21 09:41:45 +0000
commit3e5b2144d52f039ec79d92e29ee6e7fe823b2b32 (patch)
tree6d8e765851bda29c331dba2b60fa20ad467534e8
parenta2d36a1f45397be49b24ffed69f500c0c6da42b0 (diff)
downloadgcc-3e5b2144d52f039ec79d92e29ee6e7fe823b2b32.tar.gz
2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
* lib-writ.adb, sem_ch6.adb: Minor reformatting and code cleanup. * sem.adb: Fix comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235325 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/lib-writ.adb20
-rw-r--r--gcc/ada/sem.adb4
-rw-r--r--gcc/ada/sem_ch6.adb8
4 files changed, 24 insertions, 13 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 45175a3cd3c..73c31eeabe6 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * lib-writ.adb, sem_ch6.adb: Minor reformatting and code cleanup.
+ * sem.adb: Fix comment.
+
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Subtype_Declaration): A subtype
diff --git a/gcc/ada/lib-writ.adb b/gcc/ada/lib-writ.adb
index 34f3628388a..37f574b0442 100644
--- a/gcc/ada/lib-writ.adb
+++ b/gcc/ada/lib-writ.adb
@@ -43,6 +43,7 @@ with Par;
with Par_SCO; use Par_SCO;
with Restrict; use Restrict;
with Rident; use Rident;
+with Stand; use Stand;
with Scn; use Scn;
with Sem_Eval; use Sem_Eval;
with Sinfo; use Sinfo;
@@ -155,9 +156,9 @@ package body Lib.Writ is
OA_Setting => 'O',
SPARK_Mode_Pragma => Empty);
- -- Parse system.ads so that the checksum is set right,
- -- Style checks are not applied. The Ekind is set to ensure
- -- that this reference is always present in the ali file.
+ -- Parse system.ads so that the checksum is set right. Style checks are
+ -- not applied. The Ekind is set to ensure that this reference is always
+ -- present in the ali file.
declare
Save_Mindex : constant Nat := Multiple_Unit_Index;
@@ -167,7 +168,8 @@ package body Lib.Writ is
Style_Check := False;
Initialize_Scanner (Units.Last, System_Source_File_Index);
Discard_List (Par (Configuration_Pragmas => False));
- Set_Ekind (Cunit_Entity (Units.Last), E_Package);
+ Set_Ekind (Cunit_Entity (Units.Last), E_Package);
+ Set_Scope (Cunit_Entity (Units.Last), Standard_Standard);
Style_Check := Save_Style;
Multiple_Unit_Index := Save_Mindex;
end;
@@ -1435,9 +1437,13 @@ package body Lib.Writ is
-- context of a unit loaded through a limited_with clause. These
-- units are never analyzed, and thus the main unit does not
-- really have a dependency on them.
+ -- Subunits are always compiled in the context of the parent,
+ -- and their file table entries are not properly decorated, they
+ -- are recognized syntactically.
if Present (Cunit_Entity (Unum))
and then Ekind (Cunit_Entity (Unum)) = E_Void
+ and then Nkind (Unit (Cunit (Unum))) /= N_Subunit
then
goto Next_Unit;
end if;
@@ -1465,9 +1471,9 @@ package body Lib.Writ is
Write_Info_Char (' ');
Write_Info_Str (Get_Hex_String (Source_Checksum (Sind)));
- -- If the dependency comes from a limited_with clause,
- -- record limited_checksum.
- -- Disable for now, until full checksum changes are checked.
+ -- If the dependency comes from a limited_with clause, record
+ -- limited_checksum. This is disabled until full checksum
+ -- changes are checked.
-- if Present (Cunit_Entity (Unum))
-- and then From_Limited_With (Cunit_Entity (Unum))
diff --git a/gcc/ada/sem.adb b/gcc/ada/sem.adb
index 345cc0e819f..7ed6a15adf9 100644
--- a/gcc/ada/sem.adb
+++ b/gcc/ada/sem.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2016, 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- --
@@ -999,7 +999,7 @@ package body Sem is
if Present (M) then
-- If we are not at the end of the list, then the easiest
- -- coding is simply to insert before our successor
+ -- coding is simply to insert before our successor.
if Present (Next (N)) then
Insert_Before_And_Analyze (Next (N), M);
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 0263a4efc61..1a996da0db8 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -3302,7 +3302,7 @@ package body Sem_Ch6 is
-- If we are generating C and this is a function returning a constrained
-- array type for which we must create a procedure with an extra out
- -- parameter, build and analyze the body now. The procedure declaration
+ -- parameter, build and analyze the body now. The procedure declaration
-- has already been created. We reuse the source body of the function,
-- because in an instance it may contain global references that cannot
-- be reanalyzed. The source function itself is not used any further,
@@ -3319,9 +3319,9 @@ package body Sem_Ch6 is
Rewrite (N, Build_Procedure_Body_Form (Spec_Id, N));
Analyze (N);
- -- The entity for the created procedure must remain invisible,
- -- so it does not participate in resolution of subsequent
- -- references to the function.
+ -- The entity for the created procedure must remain invisible, so it
+ -- does not participate in resolution of subsequent references to the
+ -- function.
Set_Is_Immediately_Visible (Corresponding_Spec (N), False);
return;