Commit f9105bfa by Arnaud Charlet

[multiple changes]

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.

From-SVN: r228885
parent 69d8d8b4
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> 2015-10-16 Arnaud Charlet <charlet@adacore.com>
* s-osprim-mingw.adb, s-osprim-x32.adb, s-taprop-mingw.adb, * s-osprim-mingw.adb, s-osprim-x32.adb, s-taprop-mingw.adb,
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- 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 -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -37,7 +37,11 @@ with System.Storage_Elements; use System.Storage_Elements; ...@@ -37,7 +37,11 @@ with System.Storage_Elements; use System.Storage_Elements;
with System.WCh_Con; use System.WCh_Con; with System.WCh_Con; use System.WCh_Con;
with System.WCh_StW; use System.WCh_StW; 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 package body Ada.Tags is
......
...@@ -1983,6 +1983,7 @@ package body Bindgen is ...@@ -1983,6 +1983,7 @@ package body Bindgen is
-- of the Ada 2005 or Ada 2012 constructs are needed by the binder file. -- of the Ada 2005 or Ada 2012 constructs are needed by the binder file.
WBI ("pragma Ada_95;"); WBI ("pragma Ada_95;");
WBI ("pragma Warnings (Off);");
-- If we are operating in Restrictions (No_Exception_Handlers) mode, -- If we are operating in Restrictions (No_Exception_Handlers) mode,
-- then we need to make sure that the binder program is compiled with -- then we need to make sure that the binder program is compiled with
...@@ -2031,7 +2032,6 @@ package body Bindgen is ...@@ -2031,7 +2032,6 @@ package body Bindgen is
end if; end if;
WBI ("package " & Ada_Main & " is"); WBI ("package " & Ada_Main & " is");
WBI (" pragma Warnings (Off);");
-- Main program case -- Main program case
...@@ -2182,6 +2182,7 @@ package body Bindgen is ...@@ -2182,6 +2182,7 @@ package body Bindgen is
-- of the Ada 2005/2012 constructs are needed by the binder file. -- of the Ada 2005/2012 constructs are needed by the binder file.
WBI ("pragma Ada_95;"); WBI ("pragma Ada_95;");
WBI ("pragma Warnings (Off);");
-- Output Source_File_Name pragmas which look like -- Output Source_File_Name pragmas which look like
...@@ -2243,7 +2244,6 @@ package body Bindgen is ...@@ -2243,7 +2244,6 @@ package body Bindgen is
WBI (""); WBI ("");
WBI ("package body " & Ada_Main & " is"); WBI ("package body " & Ada_Main & " is");
WBI (" pragma Warnings (Off);");
WBI (""); WBI ("");
-- Generate externals for elaboration entities -- Generate externals for elaboration entities
......
...@@ -462,10 +462,15 @@ package Einfo is ...@@ -462,10 +462,15 @@ package Einfo is
-- copying trees, to determine whether or not to copy an Itype, and -- copying trees, to determine whether or not to copy an Itype, and
-- also for accessibility checks on anonymous access types. This -- also for accessibility checks on anonymous access types. This
-- node is typically an object declaration, component declaration, -- node is typically an object declaration, component declaration,
-- type or subtype declaration. For an access discriminant in a type -- type or subtype declaration.
-- declaration, the associated_node_for_itype is the discriminant
-- specification. For an access parameter it is the enclosing subprogram -- For an access discriminant in a type declaration, the associated_
-- declaration. -- 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 -- Itypes have no explicit declaration, and therefore are not attached to
-- the tree: their Parent field is always empty. The Associated_Node_For_ -- the tree: their Parent field is always empty. The Associated_Node_For_
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- 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 -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -33,6 +33,10 @@ ...@@ -33,6 +33,10 @@
-- is not supported. It returns tracebacks as lists of LF separated strings of -- is not supported. It returns tracebacks as lists of LF separated strings of
-- the form "0x..." corresponding to the addresses. -- 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 Ada.Exceptions.Traceback; use Ada.Exceptions.Traceback;
with System.Address_Image; with System.Address_Image;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- 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 -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -62,6 +62,10 @@ ...@@ -62,6 +62,10 @@
-- Symbolic_Traceback return a list of addresses expressed as "0x..." -- Symbolic_Traceback return a list of addresses expressed as "0x..."
-- separated by line feed. -- 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; with Ada.Exceptions;
package System.Traceback.Symbolic is package System.Traceback.Symbolic is
......
...@@ -5919,10 +5919,12 @@ package body Sem_Ch3 is ...@@ -5919,10 +5919,12 @@ package body Sem_Ch3 is
else else
-- Temporarily remove the current scope (record or subprogram) from -- Temporarily remove the current scope (record or subprogram) from
-- the stack to add the new declarations to the enclosing scope. -- 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; Scope_Stack.Decrement_Last;
Analyze (Decl); Analyze (Decl);
Set_Is_Itype (Anon); Set_Is_Itype (Anon);
Set_Associated_Node_For_Itype (Anon, N);
Scope_Stack.Append (Curr_Scope); Scope_Stack.Append (Curr_Scope);
end if; end if;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment