-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
--- 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. --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
with Types; use Types;
--- Do we really need the with of Namet?
-
-pragma Warnings (Off);
-with Namet; use Namet;
-pragma Elaborate_All (Namet);
-pragma Warnings (On);
-
package Stand is
type Standard_Entity_Type is (
S_Standard,
S_ASCII,
- -- Types defined in package Standard
+ -- Types and subtypes defined in package Standard (in the order in which
+ -- they appear in the RM, so that the declarations are in the right
+ -- order for the purposes of ASIS traversals
S_Boolean,
- S_Character,
- S_Wide_Character,
- S_Wide_Wide_Character,
- S_String,
- S_Wide_String,
- S_Wide_Wide_String,
- S_Duration,
S_Short_Short_Integer,
S_Short_Integer,
S_Long_Integer,
S_Long_Long_Integer,
+ S_Natural,
+ S_Positive,
+
S_Short_Float,
S_Float,
S_Long_Float,
S_Long_Long_Float,
+ S_Character,
+ S_Wide_Character,
+ S_Wide_Wide_Character,
+
+ S_String,
+ S_Wide_String,
+ S_Wide_Wide_String,
+
+ S_Duration,
+
-- Enumeration literals for type Boolean
S_False,
S_True,
- -- Subtypes declared in package Standard
-
- S_Natural,
- S_Positive,
-
-- Exceptions declared in package Standard
S_Constraint_Error,
S_DEL); -- 16#7F#
subtype S_Types is
- Standard_Entity_Type range S_Boolean .. S_Long_Long_Float;
+ Standard_Entity_Type range S_Boolean .. S_Duration;
subtype S_Exceptions is
Standard_Entity_Type range S_Constraint_Error .. S_Tasking_Error;
type Standard_Entity_Array_Type is array (Standard_Entity_Type) of Node_Id;
Standard_Entity : Standard_Entity_Array_Type;
- -- This array contains pointers to the Defining Identifier nodes
- -- for each of the entities defined in Standard_Entities_Type. It
- -- is initialized by the Create_Standard procedure.
+ -- This array contains pointers to the Defining Identifier nodes for each
+ -- of the visible entities defined in Standard_Entities_Type. The array is
+ -- initialized by the Create_Standard procedure.
Standard_Package_Node : Node_Id;
-- Points to the N_Package_Declaration node for standard. Also
-- carrying the enumeration literal names.
Standard_A_Char : Entity_Id;
- -- Access to character, used as a component of the exception type to
- -- denote a thin pointer component.
+ -- Access to character, used as a component of the exception type to denote
+ -- a thin pointer component.
Standard_Debug_Renaming_Type : Entity_Id;
- -- A zero-size subtype of Integer, used as the type of variables used
- -- to provide the debugger with name encodings for renaming declarations.
+ -- A zero-size subtype of Integer, used as the type of variables used to
+ -- provide the debugger with name encodings for renaming declarations.
+
+ Predefined_Float_Types : Elist_Id;
+ -- Entities for predefined floating point types. These are used by
+ -- the semantic phase to select appropriate types for floating point
+ -- declarations. This list is ordered by preference. All types up to
+ -- Long_Long_Float_Type are considered for plain "digits N" declarations,
+ -- while selection of later types requires a range specification and
+ -- possibly other attributes or pragmas.
-- The entities labeled Any_xxx are used in situations where the full
-- characteristics of an entity are not yet known, e.g. Any_Character
Any_Type : Entity_Id;
-- Used to represent some unknown type. Plays an important role in
- -- avoiding cascaded errors, since any node that remains labaled with
+ -- avoiding cascaded errors, since any node that remains labeled with
-- this type corresponds to an already issued error message. Any_Type
-- is propagated to avoid cascaded errors from a single type error.
-- Used to represent some unknown integer type
Any_Modular : Entity_Id;
- -- Used to represent the result type of a boolean operation on an
- -- integer literal. The result is not Universal_Integer, because it is
- -- only legal in a modular context.
+ -- Used to represent the result type of a boolean operation on an integer
+ -- literal. The result is not Universal_Integer, because it is only legal
+ -- in a modular context.
Any_Numeric : Entity_Id;
-- Used to represent some unknown numeric type
-- Used to represent some unknown scalar type
Any_String : Entity_Id;
- -- The type Any_String is used for string literals before type
- -- resolution. It corresponds to array (Positive range <>) of character
- -- where the component type is compatible with any character type,
- -- not just Standard_Character.
+ -- The type Any_String is used for string literals before type resolution.
+ -- It corresponds to array (Positive range <>) of character where the
+ -- component type is compatible with any character type, not just
+ -- Standard_Character.
Universal_Integer : Entity_Id;
-- Entity for universal integer type. The bounds of this type correspond
Universal_Real : Entity_Id;
-- Entity for universal real type. The bounds of this type correspond to
- -- to the largest supported real type (i.e. Long_Long_Real). It is the
+ -- to the largest supported real type (i.e. Long_Long_Float). It is the
-- type used for runtime calculations in type universal real. Note that
- -- this type is always IEEE format, even if Long_Long_Real is Vax_Float
+ -- this type is always IEEE format, even if Long_Long_Float is Vax_Float
-- (and in that case the bounds don't correspond exactly).
Universal_Fixed : Entity_Id;
Standard_Integer_16 : Entity_Id;
Standard_Integer_32 : Entity_Id;
Standard_Integer_64 : Entity_Id;
- -- These are signed integer types with the indicated sizes, They are
- -- used for the underlying implementation types for fixed-point and
- -- enumeration types.
+ -- These are signed integer types with the indicated sizes, They are used
+ -- for the underlying implementation types for fixed-point and enumeration
+ -- types.
Standard_Unsigned : Entity_Id;
-- An unsigned type of the same size as Standard_Integer
-- initialization that is carried out by Create_Standard.
procedure Tree_Write;
- -- Writes out the entity values in this package to the current
- -- tree file using Osint.Tree_Write.
+ -- Writes out the entity values in this package to the current tree file
+ -- using Osint.Tree_Write.
end Stand;