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;
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;
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;
-- 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;
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))
-- --
-- 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- --
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);
-- 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,
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;