lib-writ.adb, [...]: Minor reformatting and code cleanup.
2016-04-21 Hristian Kirtchev <kirtchev@adacore.com> * lib-writ.adb, sem_ch6.adb: Minor reformatting and code cleanup. * sem.adb: Fix comment. From-SVN: r235325
This commit is contained in:
parent
c42aba6bb3
commit
c4dc212506
4 changed files with 24 additions and 13 deletions
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue