aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/cstand.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2013-10-10 12:53:30 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2013-10-10 12:53:30 +0200
commitc1645ac8762353e4ac4d91d46cc1a0c039647542 (patch)
tree5362afd7bb818177361b88ce362aa0381bde51bf /gcc/ada/cstand.adb
parentf0e7963fb90348ae34577e0060dc80d03d71279e (diff)
downloadgcc-c1645ac8762353e4ac4d91d46cc1a0c039647542.zip
gcc-c1645ac8762353e4ac4d91d46cc1a0c039647542.tar.gz
gcc-c1645ac8762353e4ac4d91d46cc1a0c039647542.tar.bz2
[multiple changes]
2013-10-10 Bob Duff <duff@adacore.com> * gnat_ugn.texi: Add gnat2xml doc. 2013-10-10 Doug Rupp <rupp@adacore.com> * s-vxwork-arm.ads: Fix interface to FP_CONTEXT. 2013-10-10 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specification): An aspect Import on a variable need not have a convention specified, as long as the implicit convention of the object, obtained from its type, is Ada or Ada-related. 2013-10-10 Robert Dewar <dewar@adacore.com> * cstand.adb (Standard_Unsigned_64): New internal type. * gnat_rm.texi: Update documentation on To_Address. * sem_attr.adb (Analyze_Attribute, case To_Address): Fix problem with out of range static values given as literals or named numbers. * stand.ads (Standard_Unsigned_64): New internal type. * stand.adb: Minor reformatting. From-SVN: r203346
Diffstat (limited to 'gcc/ada/cstand.adb')
-rw-r--r--gcc/ada/cstand.adb29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/ada/cstand.adb b/gcc/ada/cstand.adb
index 09c125d..57355be 100644
--- a/gcc/ada/cstand.adb
+++ b/gcc/ada/cstand.adb
@@ -1305,6 +1305,9 @@ package body CStand is
Set_Scope (Standard_Integer_64, Standard_Standard);
Build_Signed_Integer_Type (Standard_Integer_64, 64);
+ -- Standard_Unsigned is not user visible, but is used internally. It
+ -- is an unsigned type with the same length as Standard.Integer.
+
Standard_Unsigned := New_Standard_Entity;
Decl := New_Node (N_Full_Type_Declaration, Stloc);
Set_Defining_Identifier (Decl, Standard_Unsigned);
@@ -1329,6 +1332,32 @@ package body CStand is
Set_Etype (High_Bound (R_Node), Standard_Unsigned);
Set_Scalar_Range (Standard_Unsigned, R_Node);
+ -- Standard_Unsigned_64 is not user visible, but is used internally. It
+ -- is an unsigned type mod 2**64, 64-bits unsigned, size is 64.
+
+ Standard_Unsigned_64 := New_Standard_Entity;
+ Decl := New_Node (N_Full_Type_Declaration, Stloc);
+ Set_Defining_Identifier (Decl, Standard_Unsigned_64);
+ Make_Name (Standard_Unsigned_64, "unsigned_64");
+
+ Set_Ekind (Standard_Unsigned_64, E_Modular_Integer_Type);
+ Set_Scope (Standard_Unsigned_64, Standard_Standard);
+ Set_Etype (Standard_Unsigned_64, Standard_Unsigned_64);
+ Init_Size (Standard_Unsigned_64, 64);
+ Set_Elem_Alignment (Standard_Unsigned_64);
+ Set_Modulus (Standard_Unsigned_64, Uint_2 ** 64);
+ Set_Is_Unsigned_Type (Standard_Unsigned_64);
+ Set_Size_Known_At_Compile_Time
+ (Standard_Unsigned_64);
+ Set_Is_Known_Valid (Standard_Unsigned_64, True);
+
+ R_Node := New_Node (N_Range, Stloc);
+ Set_Low_Bound (R_Node, Make_Integer (Uint_0));
+ Set_High_Bound (R_Node, Make_Integer (Uint_2 ** 64 - 1));
+ Set_Etype (Low_Bound (R_Node), Standard_Unsigned_64);
+ Set_Etype (High_Bound (R_Node), Standard_Unsigned_64);
+ Set_Scalar_Range (Standard_Unsigned_64, R_Node);
+
-- Note: universal integer and universal real are constructed as fully
-- formed signed numeric types, with parameters corresponding to the
-- longest runtime types (Long_Long_Integer and Long_Long_Float). This