diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-10-31 17:49:05 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-10-31 17:49:05 +0000 |
commit | aeccd5a4b99421e20f1d428f5fb5a73482cecf20 (patch) | |
tree | 110c1e22b4771e49735353c1e1897bd00d4288a2 /gcc/ada | |
parent | a7db85059646becbe96ef4a2c4b4388e66a5775c (diff) | |
download | gcc-aeccd5a4b99421e20f1d428f5fb5a73482cecf20.tar.gz |
2006-10-31 Robert Dewar <dewar@adacore.com>
* lib.adb, lib.ads: (In_Predefined_Unit): New functions
* a-finali.ads, a-ngcoty.ads, a-strbou.ads, a-stream.ads, a-strmap.ads,
a-strunb.ads, a-stwibo.ads, a-stwima.ads, a-stwiun.ads, a-taside.ads,
a-coorse.ads, a-convec.ads, a-coinve.ads, a-cohama.ads, a-ciorse.ads,
a-cihama.ads, a-cihase.ads, a-cohase.ads, a-ciorma.ads, a-coorma.ads,
a-ciormu.ads, a-coormu.ads, a-stzbou.ads, a-stzmap.ads, a-stzunb.ads,
a-except-2005.ads: Add pragma Preelaborable_Warning
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118242 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/a-cihama.ads | 5 | ||||
-rw-r--r-- | gcc/ada/a-cihase.ads | 4 | ||||
-rw-r--r-- | gcc/ada/a-ciorma.ads | 4 | ||||
-rw-r--r-- | gcc/ada/a-ciormu.ads | 2 | ||||
-rw-r--r-- | gcc/ada/a-ciorse.ads | 4 | ||||
-rw-r--r-- | gcc/ada/a-cohama.ads | 4 | ||||
-rw-r--r-- | gcc/ada/a-cohase.ads | 4 | ||||
-rw-r--r-- | gcc/ada/a-coinve.ads | 4 | ||||
-rw-r--r-- | gcc/ada/a-convec.ads | 4 | ||||
-rw-r--r-- | gcc/ada/a-coorma.ads | 4 | ||||
-rw-r--r-- | gcc/ada/a-coormu.ads | 2 | ||||
-rw-r--r-- | gcc/ada/a-coorse.ads | 4 | ||||
-rw-r--r-- | gcc/ada/a-except-2005.ads | 6 | ||||
-rw-r--r-- | gcc/ada/a-finali.ads | 4 | ||||
-rw-r--r-- | gcc/ada/a-ngcoty.ads | 1 | ||||
-rw-r--r-- | gcc/ada/a-strbou.ads | 3 | ||||
-rw-r--r-- | gcc/ada/a-stream.ads | 1 | ||||
-rw-r--r-- | gcc/ada/a-strmap.ads | 4 | ||||
-rw-r--r-- | gcc/ada/a-strunb.ads | 9 | ||||
-rw-r--r-- | gcc/ada/a-stwibo.ads | 3 | ||||
-rw-r--r-- | gcc/ada/a-stwima.ads | 2 | ||||
-rw-r--r-- | gcc/ada/a-stwiun.ads | 9 | ||||
-rw-r--r-- | gcc/ada/a-stzbou.ads | 3 | ||||
-rw-r--r-- | gcc/ada/a-stzmap.ads | 2 | ||||
-rw-r--r-- | gcc/ada/a-stzunb.ads | 9 | ||||
-rw-r--r-- | gcc/ada/a-taside.ads | 3 | ||||
-rw-r--r-- | gcc/ada/lib.adb | 16 | ||||
-rw-r--r-- | gcc/ada/lib.ads | 11 |
28 files changed, 91 insertions, 40 deletions
diff --git a/gcc/ada/a-cihama.ads b/gcc/ada/a-cihama.ads index 18963d5048c..b1b4630376a 100644 --- a/gcc/ada/a-cihama.ads +++ b/gcc/ada/a-cihama.ads @@ -7,7 +7,7 @@ -- -- -- 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 -- @@ -50,7 +50,10 @@ package Ada.Containers.Indefinite_Hashed_Maps is 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; diff --git a/gcc/ada/a-cihase.ads b/gcc/ada/a-cihase.ads index 71636340414..0d36adfe609 100644 --- a/gcc/ada/a-cihase.ads +++ b/gcc/ada/a-cihase.ads @@ -7,7 +7,7 @@ -- -- -- 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 -- @@ -52,8 +52,10 @@ package Ada.Containers.Indefinite_Hashed_Sets is pragma Preelaborate; type Set is tagged private; + pragma Preelaborable_Initialization (Set); type Cursor is private; + pragma Preelaborable_Initialization (Cursor); Empty_Set : constant Set; diff --git a/gcc/ada/a-ciorma.ads b/gcc/ada/a-ciorma.ads index 7d16b2b4c1a..0d733a17566 100644 --- a/gcc/ada/a-ciorma.ads +++ b/gcc/ada/a-ciorma.ads @@ -7,7 +7,7 @@ -- -- -- 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 -- @@ -51,8 +51,10 @@ package Ada.Containers.Indefinite_Ordered_Maps is 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; diff --git a/gcc/ada/a-ciormu.ads b/gcc/ada/a-ciormu.ads index 358c891649d..0bcf19c440b 100644 --- a/gcc/ada/a-ciormu.ads +++ b/gcc/ada/a-ciormu.ads @@ -50,8 +50,10 @@ package Ada.Containers.Indefinite_Ordered_Multisets is 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; diff --git a/gcc/ada/a-ciorse.ads b/gcc/ada/a-ciorse.ads index 1c1c7860332..3fc5f452752 100644 --- a/gcc/ada/a-ciorse.ads +++ b/gcc/ada/a-ciorse.ads @@ -7,7 +7,7 @@ -- -- -- 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 -- @@ -50,8 +50,10 @@ package Ada.Containers.Indefinite_Ordered_Sets is 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; diff --git a/gcc/ada/a-cohama.ads b/gcc/ada/a-cohama.ads index d65401f01eb..f090c82f99e 100644 --- a/gcc/ada/a-cohama.ads +++ b/gcc/ada/a-cohama.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- @@ -49,8 +49,10 @@ package Ada.Containers.Hashed_Maps is pragma Preelaborate; type Map is tagged private; + pragma Preelaborable_Initialization (Map); type Cursor is private; + pragma Preelaborable_Initialization (Cursor); Empty_Map : constant Map; diff --git a/gcc/ada/a-cohase.ads b/gcc/ada/a-cohase.ads index dccb56cb0cc..b0eb14cc290 100644 --- a/gcc/ada/a-cohase.ads +++ b/gcc/ada/a-cohase.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- @@ -51,8 +51,10 @@ package Ada.Containers.Hashed_Sets is pragma Preelaborate; type Set is tagged private; + pragma Preelaborable_Initialization (Set); type Cursor is private; + pragma Preelaborable_Initialization (Cursor); Empty_Set : constant Set; diff --git a/gcc/ada/a-coinve.ads b/gcc/ada/a-coinve.ads index e5587f14625..317dc75366e 100644 --- a/gcc/ada/a-coinve.ads +++ b/gcc/ada/a-coinve.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- @@ -52,8 +52,10 @@ package Ada.Containers.Indefinite_Vectors is 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; diff --git a/gcc/ada/a-convec.ads b/gcc/ada/a-convec.ads index 4fa0281d41c..bceea179995 100644 --- a/gcc/ada/a-convec.ads +++ b/gcc/ada/a-convec.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- @@ -51,8 +51,10 @@ package Ada.Containers.Vectors is 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; diff --git a/gcc/ada/a-coorma.ads b/gcc/ada/a-coorma.ads index f07b07373d0..18de34dddc3 100644 --- a/gcc/ada/a-coorma.ads +++ b/gcc/ada/a-coorma.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- @@ -50,8 +50,10 @@ package Ada.Containers.Ordered_Maps is 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; diff --git a/gcc/ada/a-coormu.ads b/gcc/ada/a-coormu.ads index 7e53d1ca7a7..ff32f8c1559 100644 --- a/gcc/ada/a-coormu.ads +++ b/gcc/ada/a-coormu.ads @@ -49,8 +49,10 @@ package Ada.Containers.Ordered_Multisets is 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; diff --git a/gcc/ada/a-coorse.ads b/gcc/ada/a-coorse.ads index 8afbd01e96f..2cc8accad53 100644 --- a/gcc/ada/a-coorse.ads +++ b/gcc/ada/a-coorse.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- @@ -49,8 +49,10 @@ package Ada.Containers.Ordered_Sets is 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; diff --git a/gcc/ada/a-except-2005.ads b/gcc/ada/a-except-2005.ads index ff06e9801a0..fd42ab79cd4 100644 --- a/gcc/ada/a-except-2005.ads +++ b/gcc/ada/a-except-2005.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- @@ -65,9 +65,13 @@ package Ada.Exceptions is -- 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; diff --git a/gcc/ada/a-finali.ads b/gcc/ada/a-finali.ads index 598c2926018..a663a0696dc 100644 --- a/gcc/ada/a-finali.ads +++ b/gcc/ada/a-finali.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- @@ -41,12 +41,14 @@ package Ada.Finalization is 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); diff --git a/gcc/ada/a-ngcoty.ads b/gcc/ada/a-ngcoty.ads index 33e818a6824..a5c9de981aa 100644 --- a/gcc/ada/a-ngcoty.ads +++ b/gcc/ada/a-ngcoty.ads @@ -48,6 +48,7 @@ package Ada.Numerics.Generic_Complex_Types is pragma Complex_Representation (Complex); type Imaginary is private; + pragma Preelaborable_Initialization (Imaginary); i : constant Imaginary; j : constant Imaginary; diff --git a/gcc/ada/a-strbou.ads b/gcc/ada/a-strbou.ads index d0dbe8c9ce0..089bb28888f 100644 --- a/gcc/ada/a-strbou.ads +++ b/gcc/ada/a-strbou.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- @@ -50,6 +50,7 @@ package Ada.Strings.Bounded is Max_Length : constant Positive := Max; type Bounded_String is private; + pragma Preelaborable_Initialization (Bounded_String); Null_Bounded_String : constant Bounded_String; diff --git a/gcc/ada/a-stream.ads b/gcc/ada/a-stream.ads index ce3c335e71f..793cb01c048 100644 --- a/gcc/ada/a-stream.ads +++ b/gcc/ada/a-stream.ads @@ -39,6 +39,7 @@ package Ada.Streams is 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; diff --git a/gcc/ada/a-strmap.ads b/gcc/ada/a-strmap.ads index bd1b98f00cc..e2a9c1d594a 100644 --- a/gcc/ada/a-strmap.ads +++ b/gcc/ada/a-strmap.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- @@ -47,6 +47,7 @@ package Ada.Strings.Maps is -------------------------------- type Character_Set is private; + pragma Preelaborable_Initialization (Character_Set); -- Representation for a set of character values: Null_Set : constant Character_Set; @@ -107,6 +108,7 @@ package Ada.Strings.Maps is ------------------------------------ type Character_Mapping is private; + pragma Preelaborable_Initialization (Character_Mapping); -- Representation for a character to character mapping: function Value diff --git a/gcc/ada/a-strunb.ads b/gcc/ada/a-strunb.ads index 5755ed202aa..a213f0b37e2 100644 --- a/gcc/ada/a-strunb.ads +++ b/gcc/ada/a-strunb.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- @@ -42,6 +42,7 @@ package Ada.Strings.Unbounded is pragma Preelaborate; type Unbounded_String is private; + pragma Preelaborable_Initialization (Unbounded_String); Null_Unbounded_String : constant Unbounded_String; @@ -426,10 +427,4 @@ private (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; diff --git a/gcc/ada/a-stwibo.ads b/gcc/ada/a-stwibo.ads index 4033543e866..7717272420c 100644 --- a/gcc/ada/a-stwibo.ads +++ b/gcc/ada/a-stwibo.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- @@ -50,6 +50,7 @@ package Ada.Strings.Wide_Bounded is 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; diff --git a/gcc/ada/a-stwima.ads b/gcc/ada/a-stwima.ads index 812de22b2bd..a745574dc84 100644 --- a/gcc/ada/a-stwima.ads +++ b/gcc/ada/a-stwima.ads @@ -45,6 +45,7 @@ package Ada.Strings.Wide_Maps is ------------------------------------- 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; @@ -122,6 +123,7 @@ package Ada.Strings.Wide_Maps is ----------------------------------------- type Wide_Character_Mapping is private; + pragma Preelaborable_Initialization (Wide_Character_Mapping); -- Representation for a wide character to wide character mapping: function Value diff --git a/gcc/ada/a-stwiun.ads b/gcc/ada/a-stwiun.ads index 4ac93acc84c..a7a967f1d35 100644 --- a/gcc/ada/a-stwiun.ads +++ b/gcc/ada/a-stwiun.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- @@ -42,6 +42,7 @@ package Ada.Strings.Wide_Unbounded is pragma Preelaborate; type Unbounded_Wide_String is private; + pragma Preelaborable_Initialization (Unbounded_Wide_String); Null_Unbounded_Wide_String : constant Unbounded_Wide_String; @@ -432,10 +433,4 @@ private (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; diff --git a/gcc/ada/a-stzbou.ads b/gcc/ada/a-stzbou.ads index 7650ef58aa9..0490147e784 100644 --- a/gcc/ada/a-stzbou.ads +++ b/gcc/ada/a-stzbou.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- @@ -50,6 +50,7 @@ package Ada.Strings.Wide_Wide_Bounded is 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; diff --git a/gcc/ada/a-stzmap.ads b/gcc/ada/a-stzmap.ads index d79b0f9844b..9083113237d 100644 --- a/gcc/ada/a-stzmap.ads +++ b/gcc/ada/a-stzmap.ads @@ -45,6 +45,7 @@ package Ada.Strings.Wide_Wide_Maps is ------------------------------------------ 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; @@ -122,6 +123,7 @@ package Ada.Strings.Wide_Wide_Maps is ---------------------------------------------- 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 diff --git a/gcc/ada/a-stzunb.ads b/gcc/ada/a-stzunb.ads index 95b8eb17269..361e2f627ff 100644 --- a/gcc/ada/a-stzunb.ads +++ b/gcc/ada/a-stzunb.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- @@ -42,6 +42,7 @@ package Ada.Strings.Wide_Wide_Unbounded is 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; @@ -441,10 +442,4 @@ private 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; diff --git a/gcc/ada/a-taside.ads b/gcc/ada/a-taside.ads index acef0f1375d..7bd560a86f2 100644 --- a/gcc/ada/a-taside.ads +++ b/gcc/ada/a-taside.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- @@ -43,6 +43,7 @@ package Ada.Task_Identification is -- In accordance with Ada 2005 AI-362 type Task_Id is private; + pragma Preelaborable_Initialization (Task_Id); Null_Task_Id : constant Task_Id; diff --git a/gcc/ada/lib.adb b/gcc/ada/lib.adb index 420f9693b3d..069474f508d 100644 --- a/gcc/ada/lib.adb +++ b/gcc/ada/lib.adb @@ -748,6 +748,22 @@ package body Lib is 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 -- ----------------------- diff --git a/gcc/ada/lib.ads b/gcc/ada/lib.ads index e02555ade65..67978da2537 100644 --- a/gcc/ada/lib.ads +++ b/gcc/ada/lib.ads @@ -491,8 +491,15 @@ package Lib is -- 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, |