+2015-03-04 Robert Dewar <dewar@adacore.com>
+
+ * sem_warn.adb: Minor reformatting.
+ * init.c: Minor tweaks.
+
+2015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
+
+ * a-coinho-shared.adb: Fix clear of already empty holder.
+
+2015-03-04 Robert Dewar <dewar@adacore.com>
+
+ * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
+ (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
+ (Note_Uplevel_Reference): Ignore call inside generic.
+ (Note_Uplevel_Reference): Fix check for no entity field.
+ (Unnest_Subprogram): Ignore call inside generic.
+ (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
+ (Visit_Node): Ignore calls to Imported subprograms.
+ (Visit_Node): Fix problem in finding subprogram body in some cases.
+ (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
+
2015-03-04 Robert Dewar <dewar@adacore.com>
* einfo.adb (Is_ARECnF_Entity): Removed.
-- --
-- B o d y --
-- --
--- Copyright (C) 2013-2014, Free Software Foundation, Inc. --
+-- Copyright (C) 2013-2015, 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- --
raise Program_Error with "attempt to tamper with elements";
end if;
- Unreference (Container.Reference);
- Container.Reference := null;
+ if Container.Reference /= null then
+ Unreference (Container.Reference);
+ Container.Reference := null;
+ end if;
end Clear;
------------------------
Set_Has_Uplevel_Reference (Typ);
return True;
+ -- If the type is at library level, always consider it static, since
+ -- uplevel references do not matter in this case.
+
+ elsif Is_Library_Level_Entity (T) then
+ Set_Is_Static_Type (T);
+ return False;
+
-- Otherwise we need to figure out what the story is with this type
else
DT := False;
- -- For a scalar type, check bounds
+ -- For a scalar type, check bounds
if Is_Scalar_Type (T) then
-- Start of processing for Check_Uplevel_Reference_To_Type
begin
+ -- Nothing to do inside a generic (all processing is for instance)
+
+ if Inside_A_Generic then
+ return;
+
-- Nothing to do if we know this is a static type
- if Is_Static_Type (Typ) then
+ elsif Is_Static_Type (Typ) then
return;
-- Nothing to do if already marked as uplevel referenced
procedure Note_Uplevel_Reference (N : Node_Id; Subp : Entity_Id) is
begin
+ -- Nothing to do inside a generic (all processing is for instance)
+
+ if Inside_A_Generic then
+ return;
+ end if;
+
-- Nothing to do if reference has no entity field
- if Nkind (N) not in N_Entity then
+ if Nkind (N) not in N_Has_Entity then
return;
end if;
-- Start of processing for Unnest_Subprogram
begin
+ -- Nothing to do inside a generic (all processing is for instance)
+
+ if Inside_A_Generic then
+ return;
+ end if;
-- At least for now, do not unnest anything but main source unit
if not In_Extended_Main_Source_Unit (Subp_Body) then
if Nkind (Nod) = N_Subprogram_Body then
if Acts_As_Spec (Nod) then
- return Defining_Unit_Name (Specification (Nod));
+ return Defining_Entity (Specification (Nod));
else
return Corresponding_Spec (Nod);
end if;
then
null;
+ -- Ignore calls to imported routines
+
+ elsif Is_Imported (Ent) then
+ null;
+
-- Here we have a call to keep and analyze
else
begin
-- Set fields of Subp_Entry for new subprogram
- STJ.Ent := Defining_Unit_Name (Specification (N));
+ STJ.Ent := Defining_Entity (Specification (N));
STJ.Lev := Get_Level (STJ.Ent);
if Nkind (N) = N_Subprogram_Body then
STJ.Bod := N;
else
- STJ.Bod := Parent (Parent (Corresponding_Body (N)));
-
+ STJ.Bod :=
+ Parent (Declaration_Node (Corresponding_Body (N)));
pragma Assert (Nkind (STJ.Bod) = N_Subprogram_Body);
end if;
----------------------
procedure Add_Form_To_Spec (F : Entity_Id; S : Node_Id) is
- Sub : constant Entity_Id := Defining_Unit_Name (S);
+ Sub : constant Entity_Id := Defining_Entity (S);
Ent : Entity_Id;
begin
* *
* C Implementation File *
* *
- * Copyright (C) 1992-2014, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2015, 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- *
installed by this file are used to catch the resulting signals that come
from these probes failing (i.e. touching protected pages). */
-/* This file should be kept synchronized with 2sinit.ads, 2sinit.adb,
- s-init-ae653-cert.adb and s-init-xi-sparc.adb. All these files implement
- the required functionality for different targets. */
+/* This file should be kept synchronized with s-init.ads, s-init.adb and the
+ s-init-*.adb variants. All these files implement the required functionality
+ for different targets. */
/* The following include is here to meet the published VxWorks requirement
that the __vxworks header appear before any other include. */
msg = "unhandled signal";
}
- Raise_From_Signal_Handler(exception, msg);
+ Raise_From_Signal_Handler (exception, msg);
}
void
sigprocmask (SIG_SETMASK, &mask, NULL);
#if defined (__ARMEL__) || defined (__PPC__)
- /* On PowerPC, kernel mode, we process signals through a Call Frame Info
- trampoline, voiding the need for myriads of fallback_frame_state
+ /* On ARM and PowerPC, kernel mode, we process signals through a Call Frame
+ Info trampoline, voiding the need for myriads of fallback_frame_state
variants in the ZCX runtime. We have no simple way to distinguish ZCX
from SJLJ here, so we do this for SJLJ as well even though this is not
necessary. This only incurs a few extra instructions and a tiny
msg = "unhandled signal";
}
- Raise_From_Signal_Handler(exception, msg);
+ Raise_From_Signal_Handler (exception, msg);
}
void
msg = "unhandled signal";
}
- Raise_From_Signal_Handler(exception, msg);
+ Raise_From_Signal_Handler (exception, msg);
}
void
procedure Output_Unreferenced_Messages is
begin
- for J in Unreferenced_Entities.First ..
- Unreferenced_Entities.Last
- loop
+ for J in Unreferenced_Entities.First .. Unreferenced_Entities.Last loop
Warn_On_Unreferenced_Entity (Unreferenced_Entities.Table (J));
end loop;
end Output_Unreferenced_Messages;