diff options
| author | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-26 10:33:36 +0000 |
|---|---|---|
| committer | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-26 10:33:36 +0000 |
| commit | a63f89638edc7c3120e52faf6815bfe3e9b270e2 (patch) | |
| tree | 61b7552b10852929b89f1cb93878fadffc1885c2 /gcc/ada | |
| parent | 9402409a6bd0d7d1f7358793f768bda3ec8a9574 (diff) | |
| parent | 087a99ba8749638f86c111f776ed326b3fbd97c0 (diff) | |
| download | gcc-cxx-conversion.tar.gz | |
Merged revisions 196607-196608,196611-196614,196625,196629-196634,196636,196639,196645-196647,196649-196650,196654-196659,196666,196669,196671-196675,196682-196683,196694-196695,196697-196698,196700-196701,196704-196706,196709,196721-196748,196750-196751,196753,196755-196758,196762,196764-196765,196767-196771,196773-196779,196781-196784,196788-196792,196795-196797,196799-196800,196804-196807,196810-196814,196821,196823-196825,196828-196829,196831-196832,196834,196841-196842,196847-196853,196855-196856,196858,196860-196861,196864-196866,196868,196870-196872,196874,196876,196878-196879,196882,196884-196890,196896-196897,196899-196902,196954,196956-196961,196964-196965,196970,196977-196978,196981-196983,196989,197002-197005,197007,197011-197012,197016-197019,197021,197023-197025,197029-197034,197036-197042 via svnmerge from cxx-conversion
svn+ssh://gcc.gnu.org/svn/gcc/trunk
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/cxx-conversion@197098 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
| -rw-r--r-- | gcc/ada/ChangeLog | 9 | ||||
| -rw-r--r-- | gcc/ada/gnatvsn.ads | 2 | ||||
| -rw-r--r-- | gcc/ada/i-fortra.ads | 64 |
3 files changed, 69 insertions, 6 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 784448558ad..3ec3e291cae 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,12 @@ +2013-03-20 Tobias Burnus <burnus@net-b.de> + + * i-fortra.ads: Update comment, add Ada 2012's optional + Star and Kind data types for enhanced interoperability. + +2013-03-16 Eric Botcazou <ebotcazou@adacore.com> + + * gnatvsn.ads (Library_Version): Bump to 4.9. + 2013-03-08 Cesar Strauss <cestrauss@gmail.com> PR ada/52123 diff --git a/gcc/ada/gnatvsn.ads b/gcc/ada/gnatvsn.ads index 418be05b750..c680ec2dea0 100644 --- a/gcc/ada/gnatvsn.ads +++ b/gcc/ada/gnatvsn.ads @@ -82,7 +82,7 @@ package Gnatvsn is -- Prefix generated by binder. If it is changed, be sure to change -- GNAT.Compiler_Version.Ver_Prefix as well. - Library_Version : constant String := "4.8"; + Library_Version : constant String := "4.9"; -- Library version. This value must be updated when the compiler -- version number Gnat_Static_Version_String is updated. -- diff --git a/gcc/ada/i-fortra.ads b/gcc/ada/i-fortra.ads index 992eb28634c..0946e49a7e3 100644 --- a/gcc/ada/i-fortra.ads +++ b/gcc/ada/i-fortra.ads @@ -26,11 +26,11 @@ package Interfaces.Fortran is type Logical is new Boolean; for Logical'Size use Integer'Size; pragma Convention (Fortran, Logical); - -- As required by Fortran standard, stand alone logical allocates same - -- space as integer (but what about the array case???). The convention - -- is important, since in Fortran, Booleans have zero/non-zero semantics - -- for False/True, and the pragma Convention (Fortran) activates the - -- special handling required in this case. + -- As required by Fortran standard, logical allocates same space as + -- an integer. The convention is important, since in Fortran, Booleans + -- are implemented with zero/non-zero semantics for False/True, and the + -- pragma Convention (Fortran) activates the special handling required + -- in this case. package Single_Precision_Complex_Types is new Ada.Numerics.Generic_Complex_Types (Real); @@ -50,6 +50,60 @@ package Interfaces.Fortran is type Fortran_Character is array (Positive range <>) of Character_Set; + -- Additional declarations as permitted by Ada 2012, p.608, paragraph 21. + -- Interoperability with Fortran 77's vendor extension using star + -- notation and Fortran 90's intrinsic types with kind=n parameter. + -- The following assumes that `n' matches the byte size, which + -- most Fortran compiler, including GCC's follow. + + type Integer_Star_1 is new Integer_8; + type Integer_Kind_1 is new Integer_8; + type Integer_Star_2 is new Integer_16; + type Integer_Kind_2 is new Integer_16; + type Integer_Star_4 is new Integer_32; + type Integer_Kind_4 is new Integer_32; + type Integer_Star_8 is new Integer_64; + type Integer_Kind_8 is new Integer_64; + + type Logical_Star_1 is new Boolean; + type Logical_Star_2 is new Boolean; + type Logical_Star_4 is new Boolean; + type Logical_Star_8 is new Boolean; + type Logical_Kind_1 is new Boolean; + type Logical_Kind_2 is new Boolean; + type Logical_Kind_4 is new Boolean; + type Logical_Kind_8 is new Boolean; + for Logical_Star_1'Size use Integer_8'Size; + for Logical_Star_2'Size use Integer_16'Size; + for Logical_Star_4'Size use Integer_32'Size; + for Logical_Star_8'Size use Integer_64'Size; + for Logical_Kind_1'Size use Integer_8'Size; + for Logical_Kind_2'Size use Integer_16'Size; + for Logical_Kind_4'Size use Integer_32'Size; + for Logical_Kind_8'Size use Integer_64'Size; + pragma Convention (Fortran, Logical_Star_1); + pragma Convention (Fortran, Logical_Star_2); + pragma Convention (Fortran, Logical_Star_4); + pragma Convention (Fortran, Logical_Star_8); + pragma Convention (Fortran, Logical_Kind_1); + pragma Convention (Fortran, Logical_Kind_2); + pragma Convention (Fortran, Logical_Kind_4); + pragma Convention (Fortran, Logical_Kind_8); + + type Real_Star_4 is new Float; + type Real_Kind_4 is new Float; + type Real_Star_8 is new Long_Float; + type Real_Kind_8 is new Long_Float; + + -- In the kind syntax, n is the same as the associated real kind. + -- In the star syntax, n is twice as large (real+imaginary size) + type Complex_Star_8 is new Complex; + type Complex_Kind_4 is new Complex; + type Complex_Star_16 is new Double_Complex; + type Complex_Kind_8 is new Double_Complex; + + type Character_Kind_n is new Fortran_Character; + function To_Fortran (Item : Character) return Character_Set; function To_Ada (Item : Character_Set) return Character; |
