system-unixware.ads, [...]: Minor comment update for AI-362 (unit is Pure).
authorRobert Dewar <dewar@adacore.com>
Thu, 16 Jun 2005 08:28:59 +0000 (10:28 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Thu, 16 Jun 2005 08:28:59 +0000 (10:28 +0200)
2005-06-14  Robert Dewar  <dewar@adacore.com>

* system-unixware.ads, system-linux-ia64.ads, system-freebsd-x86.ads,
system-lynxos-ppc.ads, system-lynxos-x86.ads, system-linux-x86_64.ads,
system-tru64.ads, system-aix.ads, system-vxworks-sparcv9.ads,
system-vxworks-xscale.ads, system-solaris-x86.ads, system-irix-o32.ads,
system-irix-n32.ads, system-hpux.ads, system-vxworks-m68k.ads,
system-linux-x86.ads, system-vxworks-mips.ads, system-vxworks-mips.ads,
system-os2.ads, system-interix.ads, system-solaris-sparc.ads,
system-solaris-sparcv9.ads, system-vms.ads, system-mingw.ads,
system-vms-zcx.ads, system-vxworks-ppc.ads, system.ads,
system-darwin-ppc.ads, system-vxworks-x86.ads, system-linux-ppc.ads,
system-linux-hppa.ads, system-vms_64.ads,
system-vxworks-alpha.ads: Minor comment update for
AI-362 (unit is Pure).

* a-chahan.ads, a-chahan.adb: Move Wide_Wide functions to Conversions
Add pragma Pure_05 for AI-362
Make remaining conversion functions obsolescent in Ada 95

* impunit.adb: Change a-swunha to a-swuwha and a-szunha to a-szuzha
Make Ada.Wide_Characters[.Unicode] available in Ada 95 mode
Add entries for a-wichun and a-zchuni
Add a-widcha a-zchara for AI-395
Add a-chacon (Ada.Characters.Conversions) to list of Ada 2005 routines

* Makefile.rtl: Change a-swunha to a-swuwha and a-szunha to a-szuzha
Add entries for a-wichun.o and a-zchuni.o
Entries for a-widcha.o and a-zchara.o
Add entry for a-chacon.o

* a-ztenau.adb: Add with of Ada.Characters.Conversions

* a-chacon.ads, a-chacon.adb: New files.

* a-taside.adb, a-exstat.adb, a-excach.adb: Add warnings off to allow
categorization violations.

* a-strmap.ads: Add pragma Pure_05 for AI-362
* a-strmap.ads: Add note on implicit categorization for AI-362

* a-tgdico.ads, a-taside.ads: Add pragma Preelaborate_05 for AI-362

* par-prag.adb: Dummy entry for pragma Persistent_BSS
Set Ada_Version_Explicit, for implementation of AI-362
Add processing for pragma Pure_05 and Preelaborate_05
Add entry for Assertion_Policy pragma

* sem.adb: Make sure predefined units are compiled with GNAT_Mode true
when needed for proper processing of categorization stuff

* sem_cat.adb:
For several cases, make errors in preealborate units warnings,
instead of errors, if GNAT_Mode is set. For AI-362.

* sem_elab.adb (Check_Elab_Call): Call to non-static subprogram in
preelaborate unit is now warning if in GNAT mode

* s-stoele.ads: Document AI-362 for pragma preelaborate

From-SVN: r101016

50 files changed:
gcc/ada/Makefile.rtl
gcc/ada/a-chacon.adb [new file with mode: 0755]
gcc/ada/a-chacon.ads [new file with mode: 0755]
gcc/ada/a-chahan.adb
gcc/ada/a-chahan.ads
gcc/ada/a-excach.adb
gcc/ada/a-exstat.adb
gcc/ada/a-strmap.ads
gcc/ada/a-taside.adb
gcc/ada/a-taside.ads
gcc/ada/a-tgdico.ads
gcc/ada/a-ztenau.adb
gcc/ada/impunit.adb
gcc/ada/par-prag.adb
gcc/ada/s-stoele.ads
gcc/ada/sem.adb
gcc/ada/sem_cat.adb
gcc/ada/sem_elab.adb
gcc/ada/system-aix.ads
gcc/ada/system-darwin-ppc.ads
gcc/ada/system-freebsd-x86.ads
gcc/ada/system-hpux.ads
gcc/ada/system-interix.ads
gcc/ada/system-irix-n32.ads
gcc/ada/system-irix-o32.ads
gcc/ada/system-linux-hppa.ads
gcc/ada/system-linux-ia64.ads
gcc/ada/system-linux-ppc.ads
gcc/ada/system-linux-x86.ads
gcc/ada/system-linux-x86_64.ads
gcc/ada/system-lynxos-ppc.ads
gcc/ada/system-lynxos-x86.ads
gcc/ada/system-mingw.ads
gcc/ada/system-os2.ads
gcc/ada/system-solaris-sparc.ads
gcc/ada/system-solaris-sparcv9.ads
gcc/ada/system-solaris-x86.ads
gcc/ada/system-tru64.ads
gcc/ada/system-unixware.ads
gcc/ada/system-vms-zcx.ads
gcc/ada/system-vms.ads
gcc/ada/system-vms_64.ads
gcc/ada/system-vxworks-alpha.ads
gcc/ada/system-vxworks-m68k.ads
gcc/ada/system-vxworks-mips.ads
gcc/ada/system-vxworks-ppc.ads
gcc/ada/system-vxworks-sparcv9.ads
gcc/ada/system-vxworks-x86.ads
gcc/ada/system-vxworks-xscale.ads
gcc/ada/system.ads

index 7687c33e6bce5a7224781b16cc30a25ff47469c1..84883c7e529186cd7421361913d7d53510d43440 100644 (file)
@@ -79,6 +79,7 @@ GNATRTL_NONTASKING_OBJS= \
   a-cgaaso$(objext) \
   a-cgarso$(objext) \
   a-cgcaso$(objext) \
+  a-chacon$(objext) \
   a-chahan$(objext) \
   a-charac$(objext) \
   a-chlat1$(objext) \
@@ -205,11 +206,11 @@ GNATRTL_NONTASKING_OBJS= \
   a-suteio$(objext) \
   a-swmwco$(objext) \
   a-swunau$(objext) \
-  a-swunha$(objext) \
+  a-swuwha$(objext) \
   a-swuwti$(objext) \
   a-szmzco$(objext) \
   a-szunau$(objext) \
-  a-szunha$(objext) \
+  a-szuzha$(objext) \
   a-szuzti$(objext) \
   a-tags$(objext) \
   a-tgdico$(objext) \
@@ -234,6 +235,8 @@ GNATRTL_NONTASKING_OBJS= \
   a-tiunio$(objext) \
   a-unccon$(objext) \
   a-uncdea$(objext) \
+  a-wichun$(objext) \
+  a-widcha$(objext) \
   a-witeio$(objext) \
   a-wtcoau$(objext) \
   a-wtcoio$(objext) \
@@ -253,6 +256,8 @@ GNATRTL_NONTASKING_OBJS= \
   a-wtmoio$(objext) \
   a-wttest$(objext) \
   a-wwunio$(objext) \
+  a-zchara$(objext) \
+  a-zchuni$(objext) \
   a-ztcoau$(objext) \
   a-ztcoio$(objext) \
   a-ztcstr$(objext) \
diff --git a/gcc/ada/a-chacon.adb b/gcc/ada/a-chacon.adb
new file mode 100755 (executable)
index 0000000..bfbf13c
--- /dev/null
@@ -0,0 +1,267 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                         GNAT RUN-TIME COMPONENTS                         --
+--                                                                          --
+--              A D A . C H A R A C T E R S . H A N D L I N G               --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--             Copyright (C) 2005 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 --
+-- apply solely to the  contents of the part following the private keyword. --
+--                                                                          --
+-- 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- --
+-- 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.                                                      --
+--                                                                          --
+-- As a special exception,  if other files  instantiate  generics from this --
+-- unit, or you link  this unit with other files  to produce an executable, --
+-- this  unit  does not  by itself cause  the resulting  executable  to  be --
+-- covered  by the  GNU  General  Public  License.  This exception does not --
+-- however invalidate  any other reasons why  the executable file  might be --
+-- covered by the  GNU Public License.                                      --
+--                                                                          --
+-- GNAT was originally developed  by the GNAT team at  New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
+--                                                                          --
+------------------------------------------------------------------------------
+
+package body Ada.Characters.Conversions is
+
+   ------------------
+   -- Is_Character --
+   ------------------
+
+   function Is_Character (Item : Wide_Character) return Boolean is
+   begin
+      return Wide_Character'Pos (Item) < 256;
+   end Is_Character;
+
+   function Is_Character (Item : Wide_Wide_Character) return Boolean is
+   begin
+      return Wide_Wide_Character'Pos (Item) < 256;
+   end Is_Character;
+
+   ---------------
+   -- Is_String --
+   ---------------
+
+   function Is_String (Item : Wide_String) return Boolean is
+   begin
+      for J in Item'Range loop
+         if Wide_Character'Pos (Item (J)) >= 256 then
+            return False;
+         end if;
+      end loop;
+
+      return True;
+   end Is_String;
+
+   function Is_String (Item : Wide_Wide_String) return Boolean is
+   begin
+      for J in Item'Range loop
+         if Wide_Wide_Character'Pos (Item (J)) >= 256 then
+            return False;
+         end if;
+      end loop;
+
+      return True;
+   end Is_String;
+
+   -----------------------
+   -- Is_Wide_Character --
+   -----------------------
+
+   function Is_Wide_Character (Item : Wide_Wide_Character) return Boolean is
+   begin
+      return Wide_Wide_Character'Pos (Item) < 2**16;
+   end Is_Wide_Character;
+
+   --------------------
+   -- Is_Wide_String --
+   --------------------
+
+   function Is_Wide_String (Item : Wide_Wide_String) return Boolean is
+   begin
+      for J in Item'Range loop
+         if Wide_Wide_Character'Pos (Item (J)) >= 2**16 then
+            return False;
+         end if;
+      end loop;
+
+      return True;
+   end Is_Wide_String;
+
+   ------------------
+   -- To_Character --
+   ------------------
+
+   function To_Character
+     (Item       : Wide_Character;
+      Substitute : Character := ' ') return Character
+   is
+   begin
+      if Is_Character (Item) then
+         return Character'Val (Wide_Character'Pos (Item));
+      else
+         return Substitute;
+      end if;
+   end To_Character;
+
+   function To_Character
+     (Item       : Wide_Wide_Character;
+      Substitute : Character := ' ') return Character
+   is
+   begin
+      if Is_Character (Item) then
+         return Character'Val (Wide_Wide_Character'Pos (Item));
+      else
+         return Substitute;
+      end if;
+   end To_Character;
+
+   ---------------
+   -- To_String --
+   ---------------
+
+   function To_String
+     (Item       : Wide_String;
+      Substitute : Character := ' ') return String
+   is
+      Result : String (1 .. Item'Length);
+
+   begin
+      for J in Item'Range loop
+         Result (J - (Item'First - 1)) := To_Character (Item (J), Substitute);
+      end loop;
+
+      return Result;
+   end To_String;
+
+   function To_String
+     (Item       : Wide_Wide_String;
+      Substitute : Character := ' ') return String
+   is
+      Result : String (1 .. Item'Length);
+
+   begin
+      for J in Item'Range loop
+         Result (J - (Item'First - 1)) := To_Character (Item (J), Substitute);
+      end loop;
+
+      return Result;
+   end To_String;
+
+   -----------------------
+   -- To_Wide_Character --
+   -----------------------
+
+   function To_Wide_Character
+     (Item : Character) return Wide_Character
+   is
+   begin
+      return Wide_Character'Val (Character'Pos (Item));
+   end To_Wide_Character;
+
+   function To_Wide_Character
+     (Item       : Wide_Wide_Character;
+      Substitute : Wide_Character := ' ') return Wide_Character
+   is
+   begin
+      if Wide_Wide_Character'Pos (Item) < 2**16 then
+         return Wide_Character'Val (Wide_Wide_Character'Pos (Item));
+      else
+         return Substitute;
+      end if;
+   end To_Wide_Character;
+
+   --------------------
+   -- To_Wide_String --
+   --------------------
+
+   function To_Wide_String
+     (Item : String) return Wide_String
+   is
+      Result : Wide_String (1 .. Item'Length);
+
+   begin
+      for J in Item'Range loop
+         Result (J - (Item'First - 1)) := To_Wide_Character (Item (J));
+      end loop;
+
+      return Result;
+   end To_Wide_String;
+
+   function To_Wide_String
+     (Item       : Wide_Wide_String;
+      Substitute : Wide_Character := ' ') return Wide_String
+   is
+      Result : Wide_String (1 .. Item'Length);
+
+   begin
+      for J in Item'Range loop
+         Result (J - (Item'First - 1)) :=
+           To_Wide_Character (Item (J), Substitute);
+      end loop;
+
+      return Result;
+   end To_Wide_String;
+
+   ----------------------------
+   -- To_Wide_Wide_Character --
+   ----------------------------
+
+   function To_Wide_Wide_Character
+     (Item : Character) return Wide_Wide_Character
+   is
+   begin
+      return Wide_Wide_Character'Val (Character'Pos (Item));
+   end To_Wide_Wide_Character;
+
+   function To_Wide_Wide_Character
+     (Item : Wide_Character) return Wide_Wide_Character
+   is
+   begin
+      return Wide_Wide_Character'Val (Wide_Character'Pos (Item));
+   end To_Wide_Wide_Character;
+
+   -------------------------
+   -- To_Wide_Wide_String --
+   -------------------------
+
+   function To_Wide_Wide_String
+     (Item : String) return Wide_Wide_String
+   is
+      Result : Wide_Wide_String (1 .. Item'Length);
+
+   begin
+      for J in Item'Range loop
+         Result (J - (Item'First - 1)) := To_Wide_Wide_Character (Item (J));
+      end loop;
+
+      return Result;
+   end To_Wide_Wide_String;
+
+   function To_Wide_Wide_String
+     (Item : Wide_String) return Wide_Wide_String
+   is
+      Result : Wide_Wide_String (1 .. Item'Length);
+
+   begin
+      for J in Item'Range loop
+         Result (J - (Item'First - 1)) := To_Wide_Wide_Character (Item (J));
+      end loop;
+
+      return Result;
+   end To_Wide_Wide_String;
+
+end Ada.Characters.Conversions;
diff --git a/gcc/ada/a-chacon.ads b/gcc/ada/a-chacon.ads
new file mode 100755 (executable)
index 0000000..f71cbe2
--- /dev/null
@@ -0,0 +1,88 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                         GNAT RUN-TIME COMPONENTS                         --
+--                                                                          --
+--              A D A . C H A R A C T E R S . H A N D L I N G               --
+--                                                                          --
+--                                 S p e c                                  --
+--                                                                          --
+--             Copyright (C) 2005 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 --
+-- apply solely to the  contents of the part following the private keyword. --
+--                                                                          --
+-- 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- --
+-- 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.                                                      --
+--                                                                          --
+-- As a special exception,  if other files  instantiate  generics from this --
+-- unit, or you link  this unit with other files  to produce an executable, --
+-- this  unit  does not  by itself cause  the resulting  executable  to  be --
+-- covered  by the  GNU  General  Public  License.  This exception does not --
+-- however invalidate  any other reasons why  the executable file  might be --
+-- covered by the  GNU Public License.                                      --
+--                                                                          --
+-- GNAT was originally developed  by the GNAT team at  New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
+--                                                                          --
+------------------------------------------------------------------------------
+
+package Ada.Characters.Conversions is
+pragma Pure (Conversions);
+
+   function Is_Character (Item : Wide_Character)      return Boolean;
+   function Is_String    (Item : Wide_String)         return Boolean;
+   function Is_Character (Item : Wide_Wide_Character) return Boolean;
+   function Is_String    (Item : Wide_Wide_String)    return Boolean;
+
+   function Is_Wide_Character (Item : Wide_Wide_Character) return Boolean;
+   function Is_Wide_String    (Item : Wide_Wide_String)    return Boolean;
+
+   function To_Wide_Character (Item : Character) return Wide_Character;
+   function To_Wide_String    (Item : String)    return Wide_String;
+
+   function To_Wide_Wide_Character
+     (Item : Character) return Wide_Wide_Character;
+
+   function To_Wide_Wide_String
+     (Item : String) return Wide_Wide_String;
+
+   function To_Wide_Wide_Character
+     (Item : Wide_Character) return Wide_Wide_Character;
+
+   function To_Wide_Wide_String
+     (Item : Wide_String) return Wide_Wide_String;
+
+   function To_Character
+     (Item       : Wide_Character;
+      Substitute : Character := ' ') return Character;
+
+   function To_String
+     (Item       : Wide_String;
+      Substitute : Character := ' ') return String;
+
+   function To_Character
+     (Item       : Wide_Wide_Character;
+      Substitute : Character := ' ') return Character;
+
+   function To_String
+     (Item       : Wide_Wide_String;
+      Substitute : Character := ' ') return String;
+
+   function To_Wide_Character
+     (Item       : Wide_Wide_Character;
+      Substitute : Wide_Character := ' ') return Wide_Character;
+
+   function To_Wide_String
+     (Item       : Wide_Wide_String;
+      Substitute : Wide_Character := ' ') return Wide_String;
+
+end Ada.Characters.Conversions;
index c94a999ddf3169b7f23fcb362d8f5a72d6cb80bb..c707d32934ed344b5bd51a891939040f271d9147 100644 (file)
@@ -304,11 +304,6 @@ package body Ada.Characters.Handling is
       return Wide_Character'Pos (Item) < 256;
    end Is_Character;
 
-   function Is_Character (Item : Wide_Wide_Character) return Boolean is
-   begin
-      return Wide_Wide_Character'Pos (Item) < 256;
-   end Is_Character;
-
    ----------------
    -- Is_Control --
    ----------------
@@ -410,17 +405,6 @@ package body Ada.Characters.Handling is
       return True;
    end Is_String;
 
-   function Is_String (Item : Wide_Wide_String) return Boolean is
-   begin
-      for J in Item'Range loop
-         if Wide_Wide_Character'Pos (Item (J)) >= 256 then
-            return False;
-         end if;
-      end loop;
-
-      return True;
-   end Is_String;
-
    --------------
    -- Is_Upper --
    --------------
@@ -430,30 +414,6 @@ package body Ada.Characters.Handling is
       return (Char_Map (Item) and Upper) /= 0;
    end Is_Upper;
 
-   -----------------------
-   -- Is_Wide_Character --
-   -----------------------
-
-   function Is_Wide_Character (Item : Wide_Wide_Character) return Boolean is
-   begin
-      return Wide_Wide_Character'Pos (Item) < 2**16;
-   end Is_Wide_Character;
-
-   --------------------
-   -- Is_Wide_String --
-   --------------------
-
-   function Is_Wide_String (Item : Wide_Wide_String) return Boolean is
-   begin
-      for J in Item'Range loop
-         if Wide_Wide_Character'Pos (Item (J)) >= 2**16 then
-            return False;
-         end if;
-      end loop;
-
-      return True;
-   end Is_Wide_String;
-
    --------------
    -- To_Basic --
    --------------
@@ -490,18 +450,6 @@ package body Ada.Characters.Handling is
       end if;
    end To_Character;
 
-   function To_Character
-     (Item       : Wide_Wide_Character;
-      Substitute : Character := ' ') return Character
-   is
-   begin
-      if Is_Character (Item) then
-         return Character'Val (Wide_Wide_Character'Pos (Item));
-      else
-         return Substitute;
-      end if;
-   end To_Character;
-
    ----------------
    -- To_ISO_646 --
    ----------------
@@ -574,20 +522,6 @@ package body Ada.Characters.Handling is
       return Result;
    end To_String;
 
-   function To_String
-     (Item       : Wide_Wide_String;
-      Substitute : Character := ' ') return String
-   is
-      Result : String (1 .. Item'Length);
-
-   begin
-      for J in Item'Range loop
-         Result (J - (Item'First - 1)) := To_Character (Item (J), Substitute);
-      end loop;
-
-      return Result;
-   end To_String;
-
    --------------
    -- To_Upper --
    --------------
@@ -623,18 +557,6 @@ package body Ada.Characters.Handling is
       return Wide_Character'Val (Character'Pos (Item));
    end To_Wide_Character;
 
-   function To_Wide_Character
-     (Item       : Wide_Wide_Character;
-      Substitute : Wide_Character := ' ') return Wide_Character
-   is
-   begin
-      if Wide_Wide_Character'Pos (Item) < 2**16 then
-         return Wide_Character'Val (Wide_Wide_Character'Pos (Item));
-      else
-         return Substitute;
-      end if;
-   end To_Wide_Character;
-
    --------------------
    -- To_Wide_String --
    --------------------
@@ -652,67 +574,4 @@ package body Ada.Characters.Handling is
       return Result;
    end To_Wide_String;
 
-   function To_Wide_String
-     (Item       : Wide_Wide_String;
-      Substitute : Wide_Character := ' ') return Wide_String
-   is
-      Result : Wide_String (1 .. Item'Length);
-
-   begin
-      for J in Item'Range loop
-         Result (J - (Item'First - 1)) :=
-           To_Wide_Character (Item (J), Substitute);
-      end loop;
-
-      return Result;
-   end To_Wide_String;
-
-   ----------------------------
-   -- To_Wide_Wide_Character --
-   ----------------------------
-
-   function To_Wide_Wide_Character
-     (Item : Character) return Wide_Wide_Character
-   is
-   begin
-      return Wide_Wide_Character'Val (Character'Pos (Item));
-   end To_Wide_Wide_Character;
-
-   function To_Wide_Wide_Character
-     (Item : Wide_Character) return Wide_Wide_Character
-   is
-   begin
-      return Wide_Wide_Character'Val (Wide_Character'Pos (Item));
-   end To_Wide_Wide_Character;
-
-   -------------------------
-   -- To_Wide_Wide_String --
-   -------------------------
-
-   function To_Wide_Wide_String
-     (Item : String) return Wide_Wide_String
-   is
-      Result : Wide_Wide_String (1 .. Item'Length);
-
-   begin
-      for J in Item'Range loop
-         Result (J - (Item'First - 1)) := To_Wide_Wide_Character (Item (J));
-      end loop;
-
-      return Result;
-   end To_Wide_Wide_String;
-
-   function To_Wide_Wide_String
-     (Item : Wide_String) return Wide_Wide_String
-   is
-      Result : Wide_Wide_String (1 .. Item'Length);
-
-   begin
-      for J in Item'Range loop
-         Result (J - (Item'First - 1)) := To_Wide_Wide_Character (Item (J));
-      end loop;
-
-      return Result;
-   end To_Wide_Wide_String;
-
 end Ada.Characters.Handling;
index ca29d75241974e6ba077a64ee51d70af217ce3eb..629b341a36880d3efc501988246fb155ce918a5d 100644 (file)
 --                                                                          --
 ------------------------------------------------------------------------------
 
-
 package Ada.Characters.Handling is
 pragma Preelaborate (Handling);
+pragma Pure_05 (Handling);
+--  In accordance with Ada 2005 AI-362
 
    ----------------------------------------
    -- Character Classification Functions --
@@ -90,54 +91,49 @@ pragma Preelaborate (Handling);
    -- Classifications of Wide_Character and Characters --
    ------------------------------------------------------
 
-   function Is_Character (Item : Wide_Character)           return Boolean;
-   function Is_Character (Item : Wide_Wide_Character)      return Boolean;
-   function Is_String    (Item : Wide_String)              return Boolean;
-   function Is_String    (Item : Wide_Wide_String)         return Boolean;
-   function Is_Wide_Character (Item : Wide_Wide_Character) return Boolean;
-   function Is_Wide_String (Item : Wide_Wide_String)       return Boolean;
+   --  Ada 2005 AI 395: these functions are moved to Ada.Characters.Conversions
+   --  and are considered obsolete in Ada.Characters.Handling. We deal with
+   --  this by using the special Ada_05 form of pragma Obsolescent which is
+   --  only active in Ada_05 mode.
 
-   ---------------------------------------------------------------------------
-   -- Conversions between Wide_Wide_Character, Wide_Character and Character --
-   ---------------------------------------------------------------------------
+   function Is_Character (Item : Wide_Character) return Boolean;
+   pragma Obsolescent
+     ("(Ada 2005) use Ada.Characters.Conversions.Is_Character", Ada_05);
 
-   function To_Character
-     (Item       : Wide_Character;
-      Substitute : Character := ' ')      return Character;
+   function Is_String (Item : Wide_String) return Boolean;
+   pragma Obsolescent
+     ("(Ada 2005) use Ada.Characters.Conversions.Is_String", Ada_05);
+
+   ------------------------------------------------------
+   -- Conversions between Wide_Character and Character --
+   ------------------------------------------------------
+
+   --  Ada 2005 AI 395: these functions are moved to Ada.Characters.Conversions
+   --  and are considered obsolete in Ada.Characters.Handling. We deal with
+   --  this by using the special Ada_05 form of pragma Obsolescent which is
+   --  only active in Ada_05 mode.
 
    function To_Character
-     (Item       : Wide_Wide_Character;
-      Substitute : Character := ' ')      return Character;
+     (Item       : Wide_Character;
+      Substitute : Character := ' ') return Character;
+   pragma Obsolescent
+     ("(Ada 2005) use Ada.Characters.Conversions.To_Character", Ada_05);
 
    function To_String
      (Item       : Wide_String;
-      Substitute : Character := ' ')      return String;
-
-   function To_String
-     (Item       : Wide_Wide_String;
-      Substitute : Character := ' ')      return String;
+      Substitute : Character := ' ') return String;
+   pragma Obsolescent
+     ("(Ada 2005) use Ada.Characters.Conversions.To_String", Ada_05);
 
    function To_Wide_Character
-     (Item : Character)                   return Wide_Character;
-   function To_Wide_Character
-     (Item       : Wide_Wide_Character;
-      Substitute : Wide_Character := ' ') return Wide_Character;
+     (Item : Character) return Wide_Character;
+   pragma Obsolescent
+     ("(Ada 2005) use Ada.Characters.Conversions.To_Wide_Character", Ada_05);
 
    function To_Wide_String
-     (Item : String)                      return Wide_String;
-   function To_Wide_String
-     (Item       : Wide_Wide_String;
-      Substitute : Wide_Character := ' ') return Wide_String;
-
-   function To_Wide_Wide_Character
-     (Item : Character)                   return Wide_Wide_Character;
-   function To_Wide_Wide_Character
-     (Item : Wide_Character)              return Wide_Wide_Character;
-
-   function To_Wide_Wide_String
-     (Item : String)                      return Wide_Wide_String;
-   function To_Wide_Wide_String
-     (Item : Wide_String)                 return Wide_Wide_String;
+     (Item : String)return Wide_String;
+   pragma Obsolescent
+     ("(Ada 2005) use Ada.Characters.Conversions.To_Wide_String", Ada_05);
 
 private
    pragma Inline (Is_Control);
@@ -157,6 +153,5 @@ private
    pragma Inline (Is_Character);
    pragma Inline (To_Character);
    pragma Inline (To_Wide_Character);
-   pragma Inline (To_Wide_Wide_Character);
 
 end Ada.Characters.Handling;
index c582dac8328a91e8fdc0e763619630ef65c69fa7..39134aedc5747d165eacc8e91957d10d3de34bf9 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2003 Free Software Foundation, Inc.          --
+--          Copyright (C) 1992-2005 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- --
 --                                                                          --
 ------------------------------------------------------------------------------
 
+pragma Warnings (Off);
+--  Allow withing of non-Preelaborated units in Ada 2005 mode where this
+--  package will be categorized as Preelaborate. See AI-362 for details.
+--  It is safe in the context of the run-time to violate the rules!
+
 with System.Traceback;
 
+pragma Warnings (On);
+
 separate (Ada.Exceptions)
 procedure Call_Chain (Excep : EOA) is
 
@@ -42,7 +49,6 @@ procedure Call_Chain (Excep : EOA) is
    --  occurrences.
 
 begin
-
    if Exception_Tracebacks /= 0 and Excep.Num_Tracebacks = 0 then
 
       --  If Exception_Tracebacks = 0 then the program was not
index e840418c7e753449d58a3bbe880fffc11ef36496..eb18a4c998688696dfcf0b285a16f8280ff85468 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2003 Free Software Foundation, Inc.          --
+--          Copyright (C) 1992-2005 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- --
 --                                                                          --
 ------------------------------------------------------------------------------
 
+pragma Warnings (Off);
+--  Allow withing of non-Preelaborated units in Ada 2005 mode where this
+--  package will be categorized as Preelaborate. See AI-362 for details.
+--  It is safe in the context of the run-time to violate the rules!
+
 with System.Exception_Table;  use System.Exception_Table;
 with System.Storage_Elements; use System.Storage_Elements;
 
+pragma Warnings (On);
+
 separate (Ada.Exceptions)
 package body Stream_Attributes is
 
index 598b23488572567af30de3978efd63be6f0c0bf1..b8af46faec5fd6e808bab6d5cc821e611816a590 100644 (file)
@@ -39,6 +39,8 @@ with Ada.Characters.Latin_1;
 
 package Ada.Strings.Maps is
 pragma Preelaborate (Maps);
+pragma Pure_05 (Maps);
+--  In accordance with Ada 2005 AI-362
 
    --------------------------------
    -- Character Set Declarations --
index bec7cc25c855a470c0897e75cd29f1911fce4255..1bd671335b2ddab47ebeb199f726594fc39af251 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---           Copyright (C) 1992-2004 Free Software Foundation, Inc.         --
+--           Copyright (C) 1992-2005 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- --
 --                                                                          --
 ------------------------------------------------------------------------------
 
+pragma Warnings (Off);
+--  Allow withing of non-Preelaborated units in Ada 2005 mode where this
+--  package will be categorized as Preelaborate. See AI-362 for details.
+--  It is safe in the context of the run-time to violate the rules!
+
 with System.Address_Image;
 --  used for the function itself
 
@@ -49,6 +54,8 @@ with System.Task_Primitives.Operations;
 
 with Unchecked_Conversion;
 
+pragma Warnings (Off);
+
 package body Ada.Task_Identification is
 
    -----------------------
index c76d4db0fa7948c93844a95ffecca4eb1829358a..5af377ce9d0b36a511761c08a8fbf1e8187bd2f5 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2004 Free Software Foundation, Inc.          --
+--          Copyright (C) 1992-2005 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 Warnings (Off);
+--  Allow withing of non-Preelaborated units in Ada 2005 mode where this
+--  package will be categorized as Preelaborate. See AI-362 for details.
+--  It is safe in the context of the run-time to violate the rules!
+
 with System;
 with System.Tasking;
 
+pragma Warnings (On);
+
 package Ada.Task_Identification is
+pragma Preelaborate_05 (Task_Identification);
+--  In accordance with Ada 2005 AI-362
 
    type Task_Id is private;
 
@@ -66,6 +75,13 @@ private
 
    type Task_Id is new System.Tasking.Task_Id;
 
+   pragma Warnings (Off);
+   --  Allow non-static constant in Ada 2005 mode where this package will be
+   --  categorized as Preelaborate. See AI-362 for details. It is safe in the
+   --  context of the run-time to violate the rules!
+
    Null_Task_Id : constant Task_Id := Task_Id (System.Tasking.Null_Task);
 
+   pragma Warnings (On);
+
 end Ada.Task_Identification;
index 8534d9f29570def35efbb50eb8ed99c0a5eb7161..51e3d80df05849d81a28ad85aa210d55360443e7 100644 (file)
@@ -13,6 +13,9 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
+pragma Warnings (Off);
+--  Turn of categorization warnings
+
 generic
    type T (<>) is abstract tagged limited private;
    type Parameters (<>) is limited private;
@@ -20,10 +23,9 @@ generic
 
 function Ada.Tags.Generic_Dispatching_Constructor
   (The_Tag : Tag; Params : access Parameters) return T'Class;
-
---  pragma Preelaborate (Generic_Dispatching_Constructor);
---  Commented out temporarily because various other predefined units do not
---  yet have proper categorization as specified by AI-362 (such as Ada.Tags,
---  Ada.Exceptions, etc.).
-
+pragma Preelaborate_05 (Generic_Dispatching_Constructor);
 pragma Import (Intrinsic, Generic_Dispatching_Constructor);
+--  Note: the reason that we use Preelaborate_05 here is so that this will
+--  compile fine during the normal build procedures. In Ada 2005 mode (which
+--  is required for this package anyway), this will be treated as Preelaborate
+--  so everything will be fine.
index d9ece2b6169e2c00d0a615313d35cac99b08cd27..ef2c201b7981a9a3f219c83973268ef111a31056 100644 (file)
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------------
 --                                                                          --
---                         GNAT RUNTIME COMPONENTS                          --
+--                         GNAT RUN-TIME COMPONENTS                         --
 --                                                                          --
 -- A D A . W I D E _ W I D E _ T E X T _ I O . E N U M E R A T I O N _ A U X--
 --                                                                          --
@@ -32,6 +32,7 @@
 ------------------------------------------------------------------------------
 
 with Ada.Wide_Wide_Text_IO.Generic_Aux; use Ada.Wide_Wide_Text_IO.Generic_Aux;
+with Ada.Characters.Conversions;        use Ada.Characters.Conversions;
 with Ada.Characters.Handling;           use Ada.Characters.Handling;
 with Interfaces.C_Streams;              use Interfaces.C_Streams;
 with System.WCh_Con;                    use System.WCh_Con;
index f1303a2eb0a5ad6d9c54026e5f584f81e6e443ad..0dce42687ed6a5bfa1e4bcf583c2411fd3eef30e 100644 (file)
@@ -157,6 +157,13 @@ package body Impunit is
      "a-tiocst",    -- Ada.Text_IO.C_Streams
      "a-wtcstr",    -- Ada.Wide_Text_IO.C_Streams
 
+      --  Note: strictly the next two should be Ada 2005 units, but it seems
+      --  harmless (and useful) to make then available in Ada 95 mode, since
+      --  they only deal with Wide_Character, not Wide_Wide_Character.
+
+     "a-wichun",    -- Ada.Wide_Characters.Unicode
+     "a-widcha",    -- Ada.Wide_Characters
+
    ---------------------------
    -- GNAT Special IO Units --
    ---------------------------
@@ -326,6 +333,7 @@ package body Impunit is
      "a-cgaaso",    -- Ada.Containers.Generic_Anonymous_Array_Sort
      "a-cgarso",    -- Ada.Containers.Generic_Array_Sort
      "a-cgcaso",    -- Ada.Containers.Generic_Constrained_Array_Sort
+     "a-chacon",    -- Ada.Characters.Conversions
      "a-chtgke",    -- Ada.Containers.Hash_Tables.Generic_Keys
      "a-chtgop",    -- Ada.Containers.Hash_Tables.Generic_Operations
      "a-cidlli",    -- Ada.Containers.Indefinite_Doubly_Linked_Lists
@@ -360,12 +368,14 @@ package body Impunit is
      "a-stzhas",    -- Ada.Strings.Wide_Wide_Hash
      "a-stzmap",    -- Ada.Strings.Wide_Wide_Maps
      "a-stzunb",    -- Ada.Strings.Wide_Wide_Unbounded
-     "a-swunha",    -- Ada.Strings.Wide_Unbounded.Hash
+     "a-swuwha",    -- Ada.Strings.Wide_Unbounded.Wide_Hash
      "a-szmzco",    -- Ada.Strings.Wide_Wide_Maps.Wide_Wide_Constants;
-     "a-szunha",    -- Ada.Strings.Wide_Wide_Unbounded.Hash
+     "a-szuzha",    -- Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Hash
      "a-tgdico",    -- Ada.Tags.Generic_Dispatching_Constructor;
      "a-tiunio",    -- Ada.Text_IO.Unbounded_IO;
+     "a-wichun",    -- Ada.Wide_Characters.Unicode
      "a-wwunio",    -- Ada.Wide_Text_IO.Wide_Unbounded_IO;
+     "a-zchara",    -- Ada.Wide_Wide_Characters
      "a-zttest",    -- Ada.Wide_Wide_Text_IO.Text_Streams
      "a-ztexio",    -- Ada.Wide_Wide_Text_IO
      "a-zzunio",    -- Ada.Wide_Wide_Text_IO.Wide_Wide_Unbounded_IO
@@ -390,6 +400,7 @@ package body Impunit is
      "a-chzla1",    -- Ada.Characters.Wide_Wide_Latin_1
      "a-chzla9",    -- Ada.Characters.Wide_Wide_Latin_9
      "a-szuzti",    -- Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Text_IO
+     "a-zchuni",    -- Ada.Wide_Wide_Characters.Unicode
 
    ---------------------------
    -- GNAT Special IO Units --
index 3288aadec6a79f28831c98b015574b035f069973..c26d7d37bcd964b3f79820739dae5691ad9c4e0a 100644 (file)
@@ -288,6 +288,7 @@ begin
 
       when Pragma_Ada_83 =>
          Ada_Version := Ada_83;
+         Ada_Version_Explicit := Ada_Version;
 
       ------------
       -- Ada_95 --
@@ -299,6 +300,7 @@ begin
 
       when Pragma_Ada_95 =>
          Ada_Version := Ada_95;
+         Ada_Version_Explicit := Ada_Version;
 
       ------------
       -- Ada_05 --
@@ -312,6 +314,7 @@ begin
       when Pragma_Ada_05 =>
          if Arg_Count = 0 then
             Ada_Version := Ada_05;
+            Ada_Version_Explicit := Ada_Version;
          end if;
 
       -----------
@@ -370,6 +373,8 @@ begin
             Ada_Version := Ada_Version_Type'Min (Ada_Version, Ada_95);
          end if;
 
+         Ada_Version_Explicit := Ada_Version;
+
       ----------------
       -- List (2.8) --
       ----------------
@@ -984,6 +989,7 @@ begin
       --  entirely in Sem_Prag, and no further checking is done by Par.
 
       when Pragma_Abort_Defer                  |
+           Pragma_Assertion_Policy             |
            Pragma_AST_Entry                    |
            Pragma_All_Calls_Remote             |
            Pragma_Annotate                     |
@@ -1066,15 +1072,16 @@ begin
            Pragma_Pack                         |
            Pragma_Passive                      |
            Pragma_Polling                      |
-           Pragma_Persistent_Data              |
-           Pragma_Persistent_Object            |
+           Pragma_Persistent_BSS               |
            Pragma_Preelaborate                 |
+           Pragma_Preelaborate_05              |
            Pragma_Priority                     |
            Pragma_Profile                      |
            Pragma_Profile_Warnings             |
            Pragma_Propagate_Exceptions         |
            Pragma_Psect_Object                 |
            Pragma_Pure                         |
+           Pragma_Pure_05                      |
            Pragma_Pure_Function                |
            Pragma_Queuing_Policy               |
            Pragma_Remote_Call_Interface        |
index 1799a7e54760078417dc33895c17f1c4c5fc5209..e490ec7b4660891b93f9c3a7c1edabe147edc1e3 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2002-2004 Free Software Foundation, Inc.          --
+--          Copyright (C) 2002-2005 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,7 +42,8 @@
 package System.Storage_Elements is
 pragma Pure (Storage_Elements);
 --  Note that we take advantage of the implementation permission to make
---  this unit Pure instead of Preelaborable; see RM 13.7.1(15).
+--  this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005,
+--  this is Pure in any case (AI-362).
 
 --  We also add the pragma Pure_Function to the operations in this package,
 --  because otherwise functions with parameters derived from Address are
index e242bc9399305ecf315167c66f55cdd717f82141..bbd0d2f8f1f552cf28016706e1071bf0c488b6a2 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2004, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2005, 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- --
@@ -1218,7 +1218,7 @@ package body Sem is
       S_New_Nodes_OK     : constant Int              := New_Nodes_OK;
       S_Outer_Gen_Scope  : constant Entity_Id        := Outer_Generic_Scope;
       S_Sem_Unit         : constant Unit_Number_Type := Current_Sem_Unit;
-
+      S_GNAT_Mode        : constant Boolean          := GNAT_Mode;
       Generic_Main       : constant Boolean :=
                              Nkind (Unit (Cunit (Main_Unit)))
                                in N_Generic_Declaration;
@@ -1270,6 +1270,21 @@ package body Sem is
       Compiler_State   := Analyzing;
       Current_Sem_Unit := Get_Cunit_Unit_Number (Comp_Unit);
 
+      --  Compile predefined units with GNAT_Mode set to True, to properly
+      --  process the categorization stuff. However, do not set set GNAT_Mode
+      --  to True for the renamings units (Text_IO, IO_Exceptions, Direct_IO,
+      --  Sequential_IO) as this would prevent pragma System_Extend to be
+      --  taken into account, for example when Text_IO is renaming DEC.Text_IO.
+
+      --  Cleaner might be to do the kludge at the point of excluding the
+      --  pragma (do not exclude for renamings ???)
+
+      GNAT_Mode :=
+        GNAT_Mode
+          or else Is_Predefined_File_Name
+                    (Unit_File_Name (Current_Sem_Unit),
+                     Renamings_Included => False);
+
       if Generic_Main then
          Expander_Mode_Save_And_Set (False);
       else
@@ -1315,6 +1330,7 @@ package body Sem is
       Inside_A_Generic       := S_Inside_A_Generic;
       New_Nodes_OK           := S_New_Nodes_OK;
       Outer_Generic_Scope    := S_Outer_Gen_Scope;
+      GNAT_Mode              := S_GNAT_Mode;
 
       Restore_Opt_Config_Switches (Save_Config_Switches);
       Expander_Mode_Restore;
index a17521cad9dc85f2eef1988de04ab1d402a52f17..2351557286aafa25509d76093ee6e95526ceac4f 100644 (file)
@@ -33,6 +33,7 @@ with Exp_Tss;  use Exp_Tss;
 with Fname;    use Fname;
 with Lib;      use Lib;
 with Nlists;   use Nlists;
+with Opt;      use Opt;
 with Sem;      use Sem;
 with Sem_Eval; use Sem_Eval;
 with Sem_Util; use Sem_Util;
@@ -163,19 +164,39 @@ package body Sem_Cat is
       With_Category := Get_Categorization (Depended_Entity);
 
       if With_Category > Unit_Category then
-
          if (Unit_Category = Remote_Types
-                 or else Unit_Category = Remote_Call_Interface)
+               or else Unit_Category = Remote_Call_Interface)
            and then In_Package_Body (Unit_Entity)
          then
             null;
 
+         --  Subunit error case. In GNAT mode, this is only a warning to allow
+         --  it to be judiciously turned off. Otherwise it is a real error.
+
          elsif Is_Subunit then
-            Error_Msg_NE ("subunit cannot depend on&"
-              & " (parent has wrong categorization)", N, Depended_Entity);
+            if GNAT_Mode then
+               Error_Msg_NE
+                 ("?subunit cannot depend on& " &
+                  "(parent has wrong categorization)", N, Depended_Entity);
+            else
+               Error_Msg_NE
+                 ("subunit cannot depend on& " &
+                  "(parent has wrong categorization)", N, Depended_Entity);
+            end if;
+
+         --  Normal error case. In GNAT mode, this is only a warning to allow
+         --  it to be judiciously turned off. Otherwise it is a real error.
+
          else
-            Error_Msg_NE ("current unit cannot depend on&"
-              & " (wrong categorization)", N, Depended_Entity);
+            if GNAT_Mode then
+               Error_Msg_NE
+                 ("?current unit cannot depend on& " &
+                  "(wrong categorization)", N, Depended_Entity);
+            else
+               Error_Msg_NE
+                 ("current unit cannot depend on& " &
+                  "(wrong categorization)", N, Depended_Entity);
+            end if;
          end if;
       end if;
 
@@ -624,27 +645,38 @@ package body Sem_Cat is
 
    begin
       case Nkind (Def) is
+
+         --  Access to subprogram case
+
          when N_Access_To_Subprogram_Definition =>
 
             --  A pure library_item must not contain the declaration of a
             --  named access type, except within a subprogram, generic
             --  subprogram, task unit, or protected unit (RM 10.2.1(16)).
 
-            if Comes_From_Source (T)
-               and then In_Pure_Unit
-               and then not In_Subprogram_Task_Protected_Unit
+            --  This test is skipped in Ada 2005 (see AI-366)
+
+            if Ada_Version < Ada_05
+              and then Comes_From_Source (T)
+              and then In_Pure_Unit
+              and then not In_Subprogram_Task_Protected_Unit
             then
                Error_Msg_N ("named access type not allowed in pure unit", T);
             end if;
 
-         when N_Access_To_Object_Definition =>
+         --  Access to object case
 
+         when N_Access_To_Object_Definition =>
             if Comes_From_Source (T)
               and then In_Pure_Unit
               and then not In_Subprogram_Task_Protected_Unit
             then
-               Error_Msg_N
-                 ("named access type not allowed in pure unit", T);
+               --  We can't give the message yet, since the type is not frozen
+               --  and in Ada 2005 mode, access types are allowed in pure units
+               --  if the type has no storage pool (see AI-366). So we set a
+               --  flag which will be checked at freeze time.
+
+               Set_Is_Pure_Unit_Access_Type (T);
             end if;
 
             --  Check for RCI or RT unit type declaration. It should not
@@ -661,7 +693,8 @@ package body Sem_Cat is
 
             Validate_SP_Access_Object_Type_Decl (T);
 
-         when others => null;
+         when others =>
+            null;
       end case;
 
       --  Set categorization flag from package on entity as well, to allow
@@ -860,8 +893,17 @@ package body Sem_Cat is
             if Nkind (Item) /= N_Label
               and then Nkind (Item) /= N_Null_Statement
             then
-               Error_Msg_N
-                 ("statements not allowed in preelaborated unit", Item);
+               --  In GNAT mode, this is a warning, allowing the run-time
+               --  to judiciously bypass this error condition.
+
+               if GNAT_Mode then
+                  Error_Msg_N
+                    ("?statements not allowed in preelaborated unit", Item);
+               else
+                  Error_Msg_N
+                    ("statements not allowed in preelaborated unit", Item);
+               end if;
+
                exit;
             end if;
 
@@ -1312,7 +1354,6 @@ package body Sem_Cat is
          --  Profile must exist, otherwise not primitive operation
 
          Param_Spec := First (Profile);
-
          while Present (Param_Spec) loop
 
             --  Now find out if this parameter is a controlling parameter
@@ -1378,7 +1419,6 @@ package body Sem_Cat is
       --  entity is inside an RCI unit.
 
       Set_Is_Remote_Call_Interface (T);
-
    end Validate_Remote_Access_Object_Type_Declaration;
 
    -----------------------------------------------
@@ -1391,20 +1431,20 @@ package body Sem_Cat is
       E  : Entity_Id;
 
    begin
-      --  This subprogram enforces the checks in (RM E.2.2(8)) for
-      --  certain uses of class-wide limited private types.
+      --  This subprogram enforces the checks in (RM E.2.2(8)) for certain uses
+      --  of class-wide limited private types.
 
       --    Storage_Pool and Storage_Size are not defined for such types
       --
       --    The expected type of allocator must not not be such a type.
 
-      --    The actual parameter of generic instantiation must not
-      --    be such a type if the formal parameter is of an access type.
+      --    The actual parameter of generic instantiation must not be such a
+      --    type if the formal parameter is of an access type.
 
       --  On entry, there are five cases
 
-      --    1. called from sem_attr Analyze_Attribute where attribute
-      --       name is either Storage_Pool or Storage_Size.
+      --    1. called from sem_attr Analyze_Attribute where attribute name is
+      --       either Storage_Pool or Storage_Size.
 
       --    2. called from exp_ch4 Expand_N_Allocator
 
@@ -1438,9 +1478,9 @@ package body Sem_Cat is
             return;
          end if;
 
-      --  This subprogram also enforces the checks in E.2.2(13).
-      --  A value of such type must not be dereferenced unless as a
-      --  controlling operand of a dispatching call.
+      --  This subprogram also enforces the checks in E.2.2(13). A value of
+      --  such type must not be dereferenced unless as controlling operand of a
+      --  dispatching call.
 
       elsif K = N_Explicit_Dereference
         and then (Comes_From_Source (N)
@@ -1467,8 +1507,8 @@ package body Sem_Cat is
          end if;
 
          --  If we are just within a procedure or function call and the
-         --  dereference has not been analyzed, return because this
-         --  procedure will be called again from sem_res Resolve_Actuals.
+         --  dereference has not been analyzed, return because this procedure
+         --  will be called again from sem_res Resolve_Actuals.
 
          if Is_Actual_Parameter (N)
            and then not Analyzed (N)
@@ -1476,9 +1516,9 @@ package body Sem_Cat is
             return;
          end if;
 
-         --  The following is to let the compiler generated tags check
-         --  pass through without error message. This is a bit kludgy
-         --  isn't there some better way of making this exclusion ???
+         --  The following is to let the compiler generated tags check pass
+         --  through without error message. This is a bit kludgy isn't there
+         --  some better way of making this exclusion ???
 
          if (PK = N_Selected_Component
               and then Present (Parent (Parent (N)))
@@ -1522,9 +1562,9 @@ package body Sem_Cat is
       E : constant Entity_Id := Etype (Expression (N));
 
    begin
-      --  This test is required in the case where a conversion appears
-      --  inside a normal package, it does not necessarily have to be
-      --  inside an RCI, Remote_Types unit (RM E.2.2(9,12)).
+      --  This test is required in the case where a conversion appears inside a
+      --  normal package, it does not necessarily have to be inside an RCI,
+      --  Remote_Types unit (RM E.2.2(9,12)).
 
       if Is_Remote_Access_To_Subprogram_Type (E)
         and then not Is_Remote_Access_To_Subprogram_Type (S)
@@ -1616,6 +1656,10 @@ package body Sem_Cat is
       --  Return true if the protected type designated by T has
       --  entry declarations.
 
+      ----------------------------
+      -- Has_Entry_Declarations --
+      ----------------------------
+
       function Has_Entry_Declarations (E : Entity_Id) return Boolean is
          Ety : Entity_Id;
 
@@ -1682,12 +1726,15 @@ package body Sem_Cat is
       function Is_Primary (N : Node_Id) return Boolean;
       --  Determine whether node is syntactically a primary in an expression.
 
+      ----------------
+      -- Is_Primary --
+      ----------------
+
       function Is_Primary (N : Node_Id) return Boolean is
          K : constant Node_Kind := Nkind (Parent (N));
 
       begin
          case K is
-
             when N_Op | N_In | N_Not_In =>
                return True;
 
@@ -1731,9 +1778,9 @@ package body Sem_Cat is
       then
          return;
 
-      --  Filter out cases where primary is default in a component
-      --  declaration, discriminant specification, or actual in a record
-      --  type initialization call.
+      --  Filter out cases where primary is default in a component declaration,
+      --  discriminant specification, or actual in a record type initialization
+      --  call.
 
       --  Initialization call of internal types.
 
@@ -1768,7 +1815,7 @@ package body Sem_Cat is
          --  We take the view that a constant defined in another preelaborated
          --  unit is preelaborable, even though it may have a private type and
          --  thus appear non-static in a client. This must be the intent of
-         --  the language, but currently is an RM gap.
+         --  the language, but currently is an RM gap ???
 
          elsif Ekind (Entity (N)) = E_Constant
            and then not Is_Static_Expression (N)
@@ -1791,9 +1838,21 @@ package body Sem_Cat is
                                                 (Renamed_Object (E))))))
             then
                null;
+
+            --  This is the error case
+
             else
-               Flag_Non_Static_Expr
-                 ("non-static constant in preelaborated unit", N);
+               --  In GNAT mode, this is just a warning, to allow it to be
+               --  judiciously turned off. Otherwise it is a real error.
+
+               if GNAT_Mode then
+                  Error_Msg_N
+                    ("?non-static constant in preelaborated unit", N);
+               else
+                  Flag_Non_Static_Expr
+                    ("non-static constant in preelaborated unit", N);
+               end if;
+
             end if;
          end if;
       end if;
index f7236abe20e1f6c90dda8397a8c4f0b55bf6ffed..3a411f8d8d46d5fbf3d543ed1139aef90d2cc371 100644 (file)
@@ -1051,8 +1051,17 @@ package body Sem_Elab is
               and then In_Preelaborated_Unit
               and then not In_Inlined_Body
             then
-               Error_Msg_N
-                 ("non-static call not allowed in preelaborated unit", N);
+               --  This is a warning in -gnatg mode allowing such calls to
+               --  be used in the predefined library with appropriate care.
+
+               if GNAT_Mode then
+                  Error_Msg_N
+                    ("?non-static call not allowed in preelaborated unit", N);
+               else
+                  Error_Msg_N
+                    ("non-static call not allowed in preelaborated unit", N);
+               end if;
+
                return;
             end if;
 
index 9129cbd4e6155bac1fa9ec2076e5b88d54f697ca..958ebfb8b42296546312dd331bafbc6185f3b02a 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index cc25af0565ecaa33f89e6c204e5110b27601ae34..981031032e23308709df36ef51e16a94e31b9d02 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index 3e9d1093f91bbf4380d06c95a33eaf2ca574b01e..a5b3ad6a4aa4a502a608b3977d89ff77fab82ff4 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index 0ac0bb7408ecc89e4f841d09052bc1da4f02f1b7..9f3af0176dcfa2dcebaf480792e08e03594f2a25 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index 2879138bdb22cce7beebc3a1c75f6743e4d4d657..d242e46d5b6b39fecab5932ea9f841b42b48fd78 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index fcfd0baebf405b398ec41a45cc7be4b054caa66b..26c46de81a36c2ec52a55f9ea6ccb6dafa5b7aaf 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index 5a69f1231142ae7586dff8aa46d73a18370e0644..26beae2c7b5037e5932ebb7023eb5453f01aa95a 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index fde1129b7b595b62406216aa290a7c28d8c4c412..ed8cf51cde30e447bdc1ecc88dfdd92b0e509853 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index bf8dcb16898d72050702196bd68dd4461bbcf76d..b8e0a371afca1e64ffd947414fcbb08aa029b894 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index 8fe222bb56b314eb78c41cb28d9bb5500d55affa..b535baf6b6135d04fe6492961313586a2ffeb89a 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index 12a239c462169e86bce0d07a7fdfe7ca8c7abf03..52706faf320df049f116cc57a10075afc09c1c20 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index 01a98aa915f7742b3028fca08699a640e078014e..35c2fc563bfc34bec8655ae1abf66f2b29334458 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index ee2bca8ebf8cfe4414322a8d9901c06ae83675f5..2a69ed54811d33400c1343c9c55c776c7fc911d2 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index 4ce8b5d91c84781a0615b37d5d23519afc00df0e..2adfcbf22f76e0ab9abfe2a754c0919bc19937e4 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index 9c07cf4648d5ae07c3a394fd1d66d9137750d9d5..9b9d7d7753818cedb39f63dbb11223c71c5a3a6d 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index 396ec1ff931195f8fb5dbdc110759e7e036486dd..c6e685b37c7330bc61579068e9f6c8086a8d4e6e 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index 2a34307c181c4613d07198788f21facdafb32d3b..1311855882a4b0c7e98a00e32b194e5f65b5a222 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index 0ae3797e12e864b937b433768fa626f0b6ab8733..edc8fc68590dc67d49343b6a4be3a84bcd251aba 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index 8f099cd75b1bd1288dc9c1191a795ffb3c6350df..b9e926a45122ae2e863ef0b6fbdd68a8ec716519 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index 695aef9010c3ec935c2d77d66b3a9786a959dd8f..635a0690f1e20841ba950c4cb02152cabfe4a7d0 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index e30b42a3a512fc9d1b2ae7402818bf16e250cae2..750296cae9a89717f49e56407ea4e2746c54058e 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index 62d969f1b054a238add897c27b5a705d3276777b..9295d2342e2ffb9a0ecc918b7864f2d1c29bc0f9 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index 5463eea2664b636100ad2bed8607f00cea36dfba..4b53113aceda2b231bbb259a68775f3818002435 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index 24a2beadd6b044cc8a1748ab411c5bcaa65d12f6..90d6de57b4280a97fd79b9ccfe351e490fdfa193 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index aa703e90c2b1df84a49221469504d1cd16c93f9c..cf334e236a6cd9f939a36c591718a9f816fe9bfa 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index 056ea790a2198c52a5d1743e35d49183563cfac8..a6c1c6eb8497867709281d7beab3febb14c43731 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index 48f8a1816a2b0d6eea465be1c85f5b3b63cd834c..4dc4b23c68811e8698c684ac8afee729c02c2d3d 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index 1ff83f9ef4b88edae71e071463aa568831412c43..088811d2eca701cb98716b1e69ecf76466737560 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index e5804ba407cecfb469131c05f18f821d534024de..cb30226f6f9fe3c42b3dfe43450dfecdedf4c226 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index 202e326b56e3e016da52c9c49b7b29c6d224b0c3..4eeb1196a319dd93a5989b817803a9d5ee863aeb 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index 0f88a4e92d7a182b9eadfbdd25d32be256f4fd4f..a163e9c955fc4a303fc71d1ce6124556e797f1f4 100644 (file)
@@ -38,8 +38,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
index ff5a57dfa8485096090dd465bc2d5c82a56d99f1..848a84f9af4789cbfc08d9a1eefeec0c802edf21 100644 (file)
@@ -43,8 +43,9 @@
 
 package System is
 pragma Pure (System);
---  Note that we take advantage of the implementation permission to
---  make this unit Pure instead of Preelaborable, see RM 13.7(36)
+--  Note that we take advantage of the implementation permission to make this
+--  unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
+--  Pure in any case (AI-362).
 
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;