-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2003, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2009, 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- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
--- MA 02111-1307, USA. --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- You should have received a copy of the GNU General Public License along --
+-- with this program; see file COPYING3. If not see --
+-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- base types, where the freeze node is preallocated at the point of
-- declaration, so that the First_Subtype_Link field can be set.
+ Freezing_Library_Level_Tagged_Type : Boolean := False;
+ -- Flag used to indicate that we are freezing the primitives of a library
+ -- level tagged types. Used to disable checks on premature freezing.
+ -- More documentation needed??? why is this flag needed? what are these
+ -- checks? why do they need disabling in some cases?
+
-----------------
-- Subprograms --
-----------------
-- do not allow a size clause if the size would not otherwise be known at
-- compile time in any case.
- procedure Expand_Atomic_Aggregate (E : Entity_Id; Typ : Entity_Id);
+ function Is_Atomic_Aggregate
+ (E : Entity_Id;
+ Typ : Entity_Id) return Boolean;
+
-- If an atomic object is initialized with an aggregate or is assigned
-- an aggregate, we have to prevent a piecemeal access or assignment
- -- to the object, even if the aggregate is to be expanded. we create
+ -- to the object, even if the aggregate is to be expanded. We create
-- a temporary for the aggregate, and assign the temporary instead,
- -- so that the back end can generate an atomic move for it.
+ -- so that the back end can generate an atomic move for it. This is
+ -- only done in the context of an object declaration or an assignment.
+ -- Function is a noop and returns false in other contexts.
function Freeze_Entity (E : Entity_Id; Loc : Source_Ptr) return List_Id;
-- Freeze an entity, and return Freeze nodes, to be inserted at the
-- frozen entities.
procedure Freeze_Before (N : Node_Id; T : Entity_Id);
- -- Freeze T then Insert the generated Freeze nodes before the node N.
+ -- Freeze T then Insert the generated Freeze nodes before the node N
procedure Freeze_Expression (N : Node_Id);
-- Freezes the required entities when the Expression N causes freezing.