+2015-10-16 Bob Duff <duff@adacore.com>
+
+ * a-tags.adb, s-trasym.adb, s-trasym.ads: Make sure we don't get
+ elaboration circularities when polling is turned on.
+
+2015-10-16 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
+ When creating a full declaration for a formal parameter, the
+ entity is labelled as an Itype, so set Associated_Node_For_Itype
+ accordingly.
+ * einfo.ads: Clarify use of Associated_Node_For_Itype.
+
+2015-10-16 Bob Duff <duff@adacore.com>
+
+ * bindgen: Move pragmas Warnings earlier, otherwise
+ we can get warnings on with_clauses.
+
2015-10-16 Arnaud Charlet <charlet@adacore.com>
* s-osprim-mingw.adb, s-osprim-x32.adb, s-taprop-mingw.adb,
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2013, 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- --
with System.WCh_Con; use System.WCh_Con;
with System.WCh_StW; use System.WCh_StW;
-pragma Elaborate_All (System.HTable);
+pragma Elaborate (System.HTable);
+-- Elaborate needed instead of Elaborate_All to avoid elaboration cycles
+-- when polling is turned on. This is safe because HTable doesn't do anything
+-- at elaboration time; it just contains a generic package we want to
+-- instantiate.
package body Ada.Tags is
-- of the Ada 2005 or Ada 2012 constructs are needed by the binder file.
WBI ("pragma Ada_95;");
+ WBI ("pragma Warnings (Off);");
-- If we are operating in Restrictions (No_Exception_Handlers) mode,
-- then we need to make sure that the binder program is compiled with
end if;
WBI ("package " & Ada_Main & " is");
- WBI (" pragma Warnings (Off);");
-- Main program case
-- of the Ada 2005/2012 constructs are needed by the binder file.
WBI ("pragma Ada_95;");
+ WBI ("pragma Warnings (Off);");
-- Output Source_File_Name pragmas which look like
WBI ("");
WBI ("package body " & Ada_Main & " is");
- WBI (" pragma Warnings (Off);");
WBI ("");
-- Generate externals for elaboration entities
-- copying trees, to determine whether or not to copy an Itype, and
-- also for accessibility checks on anonymous access types. This
-- node is typically an object declaration, component declaration,
--- type or subtype declaration. For an access discriminant in a type
--- declaration, the associated_node_for_itype is the discriminant
--- specification. For an access parameter it is the enclosing subprogram
--- declaration.
+-- type or subtype declaration.
+
+-- For an access discriminant in a type declaration, the associated_
+-- node_for_itype is the corresponding discriminant specification.
+
+-- For an access parameter it is the enclosing subprogram declaration.
+
+-- For an access_to_protected_subprogram parameter it is the declaration
+-- of the corresponding formal parameter.
--
-- Itypes have no explicit declaration, and therefore are not attached to
-- the tree: their Parent field is always empty. The Associated_Node_For_
-- --
-- B o d y --
-- --
--- Copyright (C) 1999-2014, AdaCore --
+-- Copyright (C) 1999-2015, AdaCore --
-- --
-- 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- --
-- is not supported. It returns tracebacks as lists of LF separated strings of
-- the form "0x..." corresponding to the addresses.
+pragma Polling (Off);
+-- We must turn polling off for this unit, because otherwise we can get
+-- elaboration circularities when polling is turned on
+
with Ada.Exceptions.Traceback; use Ada.Exceptions.Traceback;
with System.Address_Image;
-- --
-- S p e c --
-- --
--- Copyright (C) 1999-2014, AdaCore --
+-- Copyright (C) 1999-2015, AdaCore --
-- --
-- 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- --
-- Symbolic_Traceback return a list of addresses expressed as "0x..."
-- separated by line feed.
+pragma Polling (Off);
+-- We must turn polling off for this unit, because otherwise we can get
+-- elaboration circularities when polling is turned on
+
with Ada.Exceptions;
package System.Traceback.Symbolic is
else
-- Temporarily remove the current scope (record or subprogram) from
-- the stack to add the new declarations to the enclosing scope.
+ -- The anonymous entity is an Itype with the proper attributes.
Scope_Stack.Decrement_Last;
Analyze (Decl);
Set_Is_Itype (Anon);
+ Set_Associated_Node_For_Itype (Anon, N);
Scope_Stack.Append (Curr_Scope);
end if;