OSDN Git Service

* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Class_Wide_Type>: Fix
[pf3gnuchains/gcc-fork.git] / gcc / ada / g-except.ads
index b12e663..dd89467 100644 (file)
@@ -6,8 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---                                                                          --
---           Copyright (C) 2000-2001 Ada Core Technologies, Inc.            --
+--                     Copyright (C) 2000-2008, AdaCore                     --
 --                                                                          --
 -- 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- --
@@ -17,8 +16,8 @@
 -- 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.                                                      --
+-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
+-- Boston, MA 02110-1301, 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, --
 -- covered by the  GNU Public License.                                      --
 --                                                                          --
 -- GNAT was originally developed  by the GNAT team at  New York University. --
--- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
 --                                                                          --
 ------------------------------------------------------------------------------
 
 --  This package provides an interface for raising predefined exceptions
---  with an exception message. It can be used from Pure units. This unit
---  is for internal use only, it is not generally available to applications.
+--  with an exception message. It can be used from Pure units.
+
+--  There is no prohibition in Ada that prevents exceptions being raised
+--  from within pure units. The raise statement is perfectly acceptable.
+
+--  However, it is not normally possible to raise an exception with a
+--  message because the routine Ada.Exceptions.Raise_Exception is not in
+--  a Pure unit. This is an annoying and unnecessary restriction and this
+--  package allows for raising the standard predefined exceptions at least.
 
 package GNAT.Exceptions is
-pragma Pure (Exceptions);
+   pragma Pure;
 
    type Exception_Type is limited null record;
-   --  Type used to specify which exception to raise.
+   --  Type used to specify which exception to raise
 
    --  Really Exception_Type is Exception_Id, but Exception_Id can't be
    --  used directly since it is declared in the non-pure unit Ada.Exceptions,