OSDN Git Service

Fix PR c++/43704
[pf3gnuchains/gcc-fork.git] / gcc / ada / ttypes.ads
index fb9f5c2..8b7749a 100644 (file)
@@ -6,18 +6,17 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2002 Free Software Foundation, Inc.          --
+--          Copyright (C) 1992-2009, 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.      --
@@ -82,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
@@ -142,11 +141,8 @@ package Ttypes is
    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_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
@@ -164,11 +160,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;
@@ -193,6 +188,10 @@ package Ttypes is
    --  The maximum alignment, in storage units, that an object or
    --  type may require on the target machine.
 
+   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
    --  endianness (Bytes_Big_Endian), not the bits value (Bits_Big_Endian).
@@ -206,4 +205,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;