diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-01 13:17:49 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-01 13:17:49 +0000 |
commit | 4acfc61ecb747daed8a72366e146c287cb5dd4a6 (patch) | |
tree | 019514c6c8e50a0e3521284d4eff43c712eee632 /gcc/ada/cstand.adb | |
parent | ddf1337b5fed79fd8dc0634ddcf64d5620c19e1b (diff) | |
download | gcc-4acfc61ecb747daed8a72366e146c287cb5dd4a6.tar.gz |
2011-08-01 Robert Dewar <dewar@adacore.com>
* atree.ads: Minor reformatting.
2011-08-01 Emmanuel Briot <briot@adacore.com>
* g-expect.adb (Get_Command_Output): Fix memory leak.
2011-08-01 Geert Bosch <bosch@adacore.com>
* cstand.adb (P_Float_Type): New procedure to print the definition of
predefined fpt types.
(P_Mixed_Name): New procedure to print a name using mixed case
(Print_Standard): Use P_Float_Type for printing floating point types
* einfo.adb (Machine_Emax_Value): Add preliminary support for quad
precision IEEE float.
2011-08-01 Thomas Quinot <quinot@adacore.com>
* sem_ch3.adb: Minor reformatting.
2011-08-01 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
the completion of a generic function, insert the new body rather than
rewriting the original.
2011-08-01 Yannick Moy <moy@adacore.com>
* sinfo.ads, errout.ads: Typos in comments.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177028 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/cstand.adb')
-rw-r--r-- | gcc/ada/cstand.adb | 82 |
1 files changed, 47 insertions, 35 deletions
diff --git a/gcc/ada/cstand.adb b/gcc/ada/cstand.adb index 8d9d798e9ae..d93d96c4618 100644 --- a/gcc/ada/cstand.adb +++ b/gcc/ada/cstand.adb @@ -1673,6 +1673,12 @@ package body CStand is procedure P_Float_Range (Id : Entity_Id); -- Prints the bounds range for the given float type entity + procedure P_Float_Type (Id : Entity_Id); + -- Prints the type declaration of the given float type entity + + procedure P_Mixed_Name (Id : Name_Id); + -- Prints Id in mixed case + ------------------- -- P_Float_Range -- ------------------- @@ -1687,6 +1693,26 @@ package body CStand is Write_Eol; end P_Float_Range; + ------------------ + -- P_Float_Type -- + ------------------ + + procedure P_Float_Type (Id : Entity_Id) is + begin + Write_Str (" type "); + P_Mixed_Name (Chars (Id)); + Write_Str (" is digits "); + Write_Int (UI_To_Int (Digits_Value (Id))); + Write_Eol; + P_Float_Range (Id); + Write_Str (" for "); + P_Mixed_Name (Chars (Id)); + Write_Str ("'Size use "); + Write_Int (UI_To_Int (RM_Size (Id))); + Write_Line (";"); + Write_Eol; + end P_Float_Type; + ----------------- -- P_Int_Range -- ----------------- @@ -1702,6 +1728,23 @@ package body CStand is Write_Eol; end P_Int_Range; + ------------------ + -- P_Mixed_Name -- + ------------------ + + procedure P_Mixed_Name (Id : Name_Id) is + begin + Get_Name_String (Id); + + for J in 1 .. Name_Len loop + if J = 1 or else Name_Buffer (J - 1) = '_' then + Name_Buffer (J) := Fold_Upper (Name_Buffer (J)); + end if; + end loop; + + Write_Str (Name_Buffer (1 .. Name_Len)); + end P_Mixed_Name; + -- Start of processing for Print_Standard begin @@ -1764,41 +1807,10 @@ package body CStand is -- Floating point types - Write_Str (" type Short_Float is digits "); - Write_Int (Standard_Short_Float_Digits); - Write_Eol; - P_Float_Range (Standard_Short_Float); - Write_Str (" for Short_Float'Size use "); - Write_Int (Standard_Short_Float_Size); - P (";"); - Write_Eol; - - Write_Str (" type Float is digits "); - Write_Int (Standard_Float_Digits); - Write_Eol; - P_Float_Range (Standard_Float); - Write_Str (" for Float'Size use "); - Write_Int (Standard_Float_Size); - P (";"); - Write_Eol; - - Write_Str (" type Long_Float is digits "); - Write_Int (Standard_Long_Float_Digits); - Write_Eol; - P_Float_Range (Standard_Long_Float); - Write_Str (" for Long_Float'Size use "); - Write_Int (Standard_Long_Float_Size); - P (";"); - Write_Eol; - - Write_Str (" type Long_Long_Float is digits "); - Write_Int (Standard_Long_Long_Float_Digits); - Write_Eol; - P_Float_Range (Standard_Long_Long_Float); - Write_Str (" for Long_Long_Float'Size use "); - Write_Int (Standard_Long_Long_Float_Size); - P (";"); - Write_Eol; + P_Float_Type (Standard_Short_Float); + P_Float_Type (Standard_Float); + P_Float_Type (Standard_Long_Float); + P_Float_Type (Standard_Long_Long_Float); P (" type Character is (...)"); Write_Str (" for Character'Size use "); |