-- --
-- S p e c --
-- --
--- Copyright (C) 2004-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2006, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
pragma Preelaborate;
type Map is tagged private;
+ pragma Preelaborable_Initialization (Map);
+
type Cursor is private;
+ pragma Preelaborable_Initialization (Cursor);
Empty_Map : constant Map;
No_Element : constant Cursor;
-- --
-- S p e c --
-- --
--- Copyright (C) 2004-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2006, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
pragma Preelaborate;
type Set is tagged private;
+ pragma Preelaborable_Initialization (Set);
type Cursor is private;
+ pragma Preelaborable_Initialization (Cursor);
Empty_Set : constant Set;
-- --
-- S p e c --
-- --
--- Copyright (C) 2004-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2006, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
function Equivalent_Keys (Left, Right : Key_Type) return Boolean;
type Map is tagged private;
+ pragma Preelaborable_Initialization (Map);
type Cursor is private;
+ pragma Preelaborable_Initialization (Cursor);
Empty_Map : constant Map;
function Equivalent_Elements (Left, Right : Element_Type) return Boolean;
type Set is tagged private;
+ pragma Preelaborable_Initialization (Set);
type Cursor is private;
+ pragma Preelaborable_Initialization (Cursor);
Empty_Set : constant Set;
-- --
-- S p e c --
-- --
--- Copyright (C) 2004-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2006, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
function Equivalent_Elements (Left, Right : Element_Type) return Boolean;
type Set is tagged private;
+ pragma Preelaborable_Initialization (Set);
type Cursor is private;
+ pragma Preelaborable_Initialization (Cursor);
Empty_Set : constant Set;
-- --
-- S p e c --
-- --
--- Copyright (C) 2004-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2006, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
pragma Preelaborate;
type Map is tagged private;
+ pragma Preelaborable_Initialization (Map);
type Cursor is private;
+ pragma Preelaborable_Initialization (Cursor);
Empty_Map : constant Map;
-- --
-- S p e c --
-- --
--- Copyright (C) 2004-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2006, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
pragma Preelaborate;
type Set is tagged private;
+ pragma Preelaborable_Initialization (Set);
type Cursor is private;
+ pragma Preelaborable_Initialization (Cursor);
Empty_Set : constant Set;
-- --
-- S p e c --
-- --
--- Copyright (C) 2004-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2006, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
No_Index : constant Extended_Index := Extended_Index'First;
type Vector is tagged private;
+ pragma Preelaborable_Initialization (Vector);
type Cursor is private;
+ pragma Preelaborable_Initialization (Cursor);
Empty_Vector : constant Vector;
-- --
-- S p e c --
-- --
--- Copyright (C) 2004-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2006, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
No_Index : constant Extended_Index := Extended_Index'First;
type Vector is tagged private;
+ pragma Preelaborable_Initialization (Vector);
type Cursor is private;
+ pragma Preelaborable_Initialization (Cursor);
Empty_Vector : constant Vector;
-- --
-- S p e c --
-- --
--- Copyright (C) 2004-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2006, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
function Equivalent_Keys (Left, Right : Key_Type) return Boolean;
type Map is tagged private;
+ pragma Preelaborable_Initialization (Map);
type Cursor is private;
+ pragma Preelaborable_Initialization (Cursor);
Empty_Map : constant Map;
function Equivalent_Elements (Left, Right : Element_Type) return Boolean;
type Set is tagged private;
+ pragma Preelaborable_Initialization (Set);
type Cursor is private;
+ pragma Preelaborable_Initialization (Cursor);
Empty_Set : constant Set;
-- --
-- S p e c --
-- --
--- Copyright (C) 2004-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2006, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
function Equivalent_Elements (Left, Right : Element_Type) return Boolean;
type Set is tagged private;
+ pragma Preelaborable_Initialization (Set);
type Cursor is private;
+ pragma Preelaborable_Initialization (Cursor);
Empty_Set : constant Set;
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- pragma, which is fine for the bootstrap.
type Exception_Id is private;
+ pragma Preelaborable_Initialization (Exception_Id);
+
Null_Id : constant Exception_Id;
type Exception_Occurrence is limited private;
+ pragma Preelaborable_Initialization (Exception_Occurrence);
+
type Exception_Occurrence_Access is access all Exception_Occurrence;
Null_Occurrence : constant Exception_Occurrence;
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
pragma Preelaborate;
type Controlled is abstract tagged private;
+ pragma Preelaborable_Initialization (Controlled);
procedure Initialize (Object : in out Controlled);
procedure Adjust (Object : in out Controlled);
procedure Finalize (Object : in out Controlled);
type Limited_Controlled is abstract tagged limited private;
+ pragma Preelaborable_Initialization (Controlled);
procedure Initialize (Object : in out Limited_Controlled);
procedure Finalize (Object : in out Limited_Controlled);
pragma Complex_Representation (Complex);
type Imaginary is private;
+ pragma Preelaborable_Initialization (Imaginary);
i : constant Imaginary;
j : constant Imaginary;
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
Max_Length : constant Positive := Max;
type Bounded_String is private;
+ pragma Preelaborable_Initialization (Bounded_String);
Null_Bounded_String : constant Bounded_String;
pragma Pure;
type Root_Stream_Type is abstract tagged limited private;
+ pragma Preelaborable_Initialization (Root_Stream_Type);
type Stream_Element is mod 2 ** Standard'Storage_Unit;
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
--------------------------------
type Character_Set is private;
+ pragma Preelaborable_Initialization (Character_Set);
-- Representation for a set of character values:
Null_Set : constant Character_Set;
------------------------------------
type Character_Mapping is private;
+ pragma Preelaborable_Initialization (Character_Mapping);
-- Representation for a character to character mapping:
function Value
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
pragma Preelaborate;
type Unbounded_String is private;
+ pragma Preelaborable_Initialization (Unbounded_String);
Null_Unbounded_String : constant Unbounded_String;
(AF.Controlled with
Reference => Null_String'Access,
Last => 0);
- -- Note: this declaration is illegal since library level controlled
- -- objects are not allowed in preelaborated units. See AI-161 for a
- -- discussion of this issue and an attempt to address it. Meanwhile,
- -- what happens in GNAT is that this check is omitted for internal
- -- implementation units (see check in sem_cat.adb).
-
end Ada.Strings.Unbounded;
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
Max_Length : constant Positive := Max;
type Bounded_Wide_String is private;
+ pragma Preelaborable_Initialization (Bounded_Wide_String);
Null_Bounded_Wide_String : constant Bounded_Wide_String;
-------------------------------------
type Wide_Character_Set is private;
+ pragma Preelaborable_Initialization (Wide_Character_Set);
-- Representation for a set of Wide_Character values:
Null_Set : constant Wide_Character_Set;
-----------------------------------------
type Wide_Character_Mapping is private;
+ pragma Preelaborable_Initialization (Wide_Character_Mapping);
-- Representation for a wide character to wide character mapping:
function Value
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
pragma Preelaborate;
type Unbounded_Wide_String is private;
+ pragma Preelaborable_Initialization (Unbounded_Wide_String);
Null_Unbounded_Wide_String : constant Unbounded_Wide_String;
(AF.Controlled with
Reference => Null_Wide_String'Access,
Last => 0);
- -- Note: this declaration is illegal since library level controlled
- -- objects are not allowed in preelaborated units. See AI-161 for a
- -- discussion of this issue and an attempt to address it. Meanwhile,
- -- what happens in GNAT is that this check is omitted for internal
- -- implementation units (see check in sem_cat.adb).
-
end Ada.Strings.Wide_Unbounded;
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
Max_Length : constant Positive := Max;
type Bounded_Wide_Wide_String is private;
+ pragma Preelaborable_Initialization (Bounded_Wide_Wide_String);
Null_Bounded_Wide_Wide_String : constant Bounded_Wide_Wide_String;
------------------------------------------
type Wide_Wide_Character_Set is private;
+ pragma Preelaborable_Initialization (Wide_Wide_Character_Set);
-- Representation for a set of Wide_Wide_Character values:
Null_Set : constant Wide_Wide_Character_Set;
----------------------------------------------
type Wide_Wide_Character_Mapping is private;
+ pragma Preelaborable_Initialization (Wide_Wide_Character_Mapping);
-- Representation for a wide character to wide character mapping:
function Value
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
pragma Preelaborate;
type Unbounded_Wide_Wide_String is private;
+ pragma Preelaborable_Initialization (Unbounded_Wide_Wide_String);
Null_Unbounded_Wide_Wide_String : constant Unbounded_Wide_Wide_String;
Reference =>
Null_Wide_Wide_String'Access,
Last => 0);
- -- Note: this declaration is illegal since library level controlled
- -- objects are not allowed in preelaborated units. See AI-161 for a
- -- discussion of this issue and an attempt to address it. Meanwhile,
- -- what happens in GNAT is that this check is omitted for internal
- -- implementation units (see check in sem_cat.adb).
-
end Ada.Strings.Wide_Wide_Unbounded;
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- In accordance with Ada 2005 AI-362
type Task_Id is private;
+ pragma Preelaborable_Initialization (Task_Id);
Null_Task_Id : constant Task_Id;
end if;
end In_Extended_Main_Source_Unit;
+ ------------------------
+ -- In_Predefined_Unit --
+ ------------------------
+
+ function In_Predefined_Unit (N : Node_Or_Entity_Id) return Boolean is
+ begin
+ return In_Predefined_Unit (Sloc (N));
+ end In_Predefined_Unit;
+
+ function In_Predefined_Unit (S : Source_Ptr) return Boolean is
+ Unit : constant Unit_Number_Type := Get_Source_Unit (S);
+ File : constant File_Name_Type := Unit_File_Name (Unit);
+ begin
+ return Is_Predefined_File_Name (File);
+ end In_Predefined_Unit;
+
-----------------------
-- In_Same_Code_Unit --
-----------------------
-- and the parent unit spec if it is separate.
function In_Extended_Main_Source_Unit (Loc : Source_Ptr) return Boolean;
- -- Same function as above, but argument is a source pointer rather
- -- than a node.
+ -- Same function as above, but argument is a source pointer
+
+ function In_Predefined_Unit (N : Node_Or_Entity_Id) return Boolean;
+ -- Returns True if the given node or entity appears within the source text
+ -- of a predefined unit (i.e. within Ada, Interfaces, System or within one
+ -- of the descendent packages of one of these three packages).
+
+ function In_Predefined_Unit (S : Source_Ptr) return Boolean;
+ -- Same function as above but argument is a source pointer
function Earlier_In_Extended_Unit (S1, S2 : Source_Ptr) return Boolean;
-- Given two Sloc values for which In_Same_Extended_Unit is true,