OSDN Git Service

* trans.h (struct gfc_ss): New field nested_ss.
[pf3gnuchains/gcc-fork.git] / gcc / ada / ttypes.ads
index edce7a0..ef57187 100644 (file)
@@ -6,19 +6,17 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---                                                                          --
---          Copyright (C) 1992-2002 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,  59 Temple Place - Suite 330,  Boston, --
--- MA 02111-1307, USA.                                                      --
+-- Public License  distributed with GNAT; see file COPYING3.  If not, go to --
+-- http://www.gnu.org/licenses for a complete copy of the license.          --
 --                                                                          --
 -- GNAT was originally developed  by the GNAT team at  New York University. --
 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
@@ -83,10 +81,10 @@ package Ttypes is
    --  for all targets.
 
    --  Note that during compilation there are two versions of package System
-   --  around. The version that is directly WITH'ed by compiler packages
+   --  around. The version that is directly with'ed by compiler packages
    --  contains host-dependent definitions, which is what is needed in that
    --  case (for example, System.Storage_Unit referenced in the source of the
-   --  compiler refers to the storage unit of the host, not the target. This
+   --  compiler refers to the storage unit of the host, not the target). This
    --  means that, like attribute references, any references to constants in
    --  package System in the compiler code are suspicious, since it is strange
    --  for the compiler to have such host dependencies. If the compiler needs
@@ -104,50 +102,56 @@ package Ttypes is
    --  example, on some machines, Short_Float may be the same as Float, and
    --  Long_Long_Float may be the same as Long_Float.
 
-   Standard_Short_Short_Integer_Size   : constant Pos := Get_Char_Size;
-   Standard_Short_Short_Integer_Width  : constant Pos :=
-                           Width_From_Size (Standard_Short_Short_Integer_Size);
-
-   Standard_Short_Integer_Size         : constant Pos := Get_Short_Size;
-   Standard_Short_Integer_Width        : constant Pos :=
-                           Width_From_Size (Standard_Short_Integer_Size);
-
-   Standard_Integer_Size               : constant Pos := Get_Int_Size;
-   Standard_Integer_Width              : constant Pos :=
-                           Width_From_Size (Standard_Integer_Size);
-
-   Standard_Long_Integer_Size          : constant Pos := Get_Long_Size;
-   Standard_Long_Integer_Width         : constant Pos :=
-                           Width_From_Size (Standard_Long_Integer_Size);
-
-   Standard_Long_Long_Integer_Size     : constant Pos := Get_Long_Long_Size;
-   Standard_Long_Long_Integer_Width    : constant Pos :=
-                           Width_From_Size (Standard_Long_Long_Integer_Size);
-
-   Standard_Short_Float_Size           : constant Pos := Get_Float_Size;
-   Standard_Short_Float_Digits         : constant Pos :=
-                           Digits_From_Size (Standard_Short_Float_Size);
-
-   Standard_Float_Size                 : constant Pos := Get_Float_Size;
-   Standard_Float_Digits               : constant Pos :=
-                           Digits_From_Size (Standard_Float_Size);
-
-   Standard_Long_Float_Size            : constant Pos := Get_Double_Size;
-   Standard_Long_Float_Digits          : constant Pos :=
-                           Digits_From_Size (Standard_Long_Float_Size);
-
-   Standard_Long_Long_Float_Size       : constant Pos := Get_Long_Double_Size;
-   Standard_Long_Long_Float_Digits     : constant Pos :=
-                           Digits_From_Size (Standard_Long_Long_Float_Size);
-
-   Standard_Character_Size             : constant Pos := Get_Char_Size;
-
-   Standard_Wide_Character_Size        : constant Pos := 16;
-   --  The Standard.Wide_Character type is special in the sense that
-   --  it is not defined in terms of its corresponding C type (wchar_t).
-   --  Unfortunately this makes the representation of Wide_Character
-   --  incompatible with the C wchar_t type.
-   --  ??? This is required by the RM or backward compatibility
+   Standard_Short_Short_Integer_Size  : constant Pos := Get_Char_Size;
+   Standard_Short_Short_Integer_Width : constant Pos :=
+                                          Width_From_Size
+                                           (Standard_Short_Short_Integer_Size);
+
+   Standard_Short_Integer_Size        : constant Pos := Get_Short_Size;
+   Standard_Short_Integer_Width       : constant Pos :=
+                                          Width_From_Size
+                                            (Standard_Short_Integer_Size);
+
+   Standard_Integer_Size              : constant Pos := Get_Int_Size;
+   Standard_Integer_Width             : constant Pos :=
+                                          Width_From_Size
+                                            (Standard_Integer_Size);
+
+   Standard_Long_Integer_Size         : constant Pos := Get_Long_Size;
+   Standard_Long_Integer_Width        : constant Pos :=
+                                          Width_From_Size
+                                            (Standard_Long_Integer_Size);
+
+   Standard_Long_Long_Integer_Size    : constant Pos := Get_Long_Long_Size;
+   Standard_Long_Long_Integer_Width   : constant Pos :=
+                                          Width_From_Size
+                                            (Standard_Long_Long_Integer_Size);
+
+   Standard_Short_Float_Size          : constant Pos := Get_Float_Size;
+   Standard_Short_Float_Digits        : constant Pos :=
+                                          Digits_From_Size
+                                            (Standard_Short_Float_Size);
+
+   Standard_Float_Size                : constant Pos := Get_Float_Size;
+   Standard_Float_Digits              : constant Pos :=
+                                          Digits_From_Size
+                                            (Standard_Float_Size);
+
+   Standard_Long_Float_Size           : constant Pos := Get_Double_Size;
+   Standard_Long_Float_Digits         : constant Pos :=
+                                          Digits_From_Size
+                                            (Standard_Long_Float_Size);
+
+   Standard_Long_Long_Float_Size      : constant Pos := Get_Long_Double_Size;
+   Standard_Long_Long_Float_Digits    : constant Pos :=
+                                          Digits_From_Size
+                                            (Standard_Long_Long_Float_Size);
+
+   Standard_Character_Size            : constant Pos := Get_Char_Size;
+
+   Standard_Wide_Character_Size       : constant Pos := 16;
+   Standard_Wide_Wide_Character_Size  : constant Pos := 32;
+   --  Standard wide character sizes
 
    --  Note: there is no specific control over the representation of
    --  enumeration types. The convention used is that if an enumeration
@@ -165,11 +169,10 @@ package Ttypes is
    System_Address_Size : constant Pos := Get_Pointer_Size;
    --  System.Address'Size (also size of all thin pointers)
 
-   System_Max_Binary_Modulus_Power    : constant Pos :=
-                                          Standard_Long_Long_Integer_Size;
+   System_Max_Binary_Modulus_Power : constant Pos :=
+                                       Standard_Long_Long_Integer_Size;
 
-   System_Max_Nonbinary_Modulus_Power : constant Pos :=
-                                          Standard_Integer_Size - 1;
+   System_Max_Nonbinary_Modulus_Power : constant Pos := Standard_Integer_Size;
 
    System_Storage_Unit : constant Pos := Get_Bits_Per_Unit;
    System_Word_Size    : constant Pos := Get_Bits_Per_Word;
@@ -191,8 +194,16 @@ package Ttypes is
    ----------------------------------------
 
    Maximum_Alignment : constant Pos := Get_Maximum_Alignment;
-   --  The maximum alignment, in storage units, that an object or
-   --  type may require on the target machine.
+   --  The maximum alignment, in storage units, that an object or type may
+   --  require on the target machine.
+
+   System_Allocator_Alignment : constant Pos :=
+                                  Get_System_Allocator_Alignment;
+   --  The alignment in storage units of addresses returned by malloc
+
+   Max_Unaligned_Field : constant Pos := Get_Max_Unaligned_Field;
+   --  The maximum supported size in bits for a field that is not aligned
+   --  on a storage unit boundary.
 
    Bytes_Big_Endian : Boolean := Get_Bytes_BE /= 0;
    --  Important note: for Ada purposes, the important setting is the bytes
@@ -207,4 +218,14 @@ package Ttypes is
    Target_Strict_Alignment : Boolean := Get_Strict_Alignment /= 0;
    --  True if instructions will fail if data is misaligned
 
+   Target_Double_Float_Alignment : Nat := Get_Double_Float_Alignment;
+   --  The default alignment of "double" floating-point types, i.e. floating
+   --  point types whose size is equal to 64 bits, or 0 if this alignment is
+   --  not specifically capped.
+
+   Target_Double_Scalar_Alignment : Nat := Get_Double_Scalar_Alignment;
+   --  The default alignment of "double" or larger scalar types, i.e. scalar
+   --  types whose size is greater or equal to 64 bits, or 0 if this alignment
+   --  is not specifically capped.
+
 end Ttypes;