diff options
author | Geert Bosch <bosch@adacore.com> | 2011-08-01 12:41:48 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-01 14:41:48 +0200 |
commit | 9eea4346af869733ba91b92d40a78de3541d3be0 (patch) | |
tree | f17ae2c4493e2fcccba6ae4458951af5c7773594 /gcc/ada/exp_util.adb | |
parent | 655b30bfde9172bd40189a787b85b16e461ef1ef (diff) | |
download | gcc-9eea4346af869733ba91b92d40a78de3541d3be0.zip gcc-9eea4346af869733ba91b92d40a78de3541d3be0.tar.gz gcc-9eea4346af869733ba91b92d40a78de3541d3be0.tar.bz2 |
sem_prag.adb (Check_No_Link_Name): New procedure.
2011-08-01 Geert Bosch <bosch@adacore.com>
* sem_prag.adb (Check_No_Link_Name): New procedure.
(Process_Import_Or_Interface): Use Check_No_Link_Name.
* cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
instead of Standard_Long_Long_Float_Size global. Preparation for
eventual removal of per type constants.
* exp_util.ads (Get_Stream_Size): New function returning the stream
size value of subtype E.
* exp_util.adb (Get_Stream_Size): Implement new function.
* exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
function.
* exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
* einfo.adb:
(Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
From-SVN: r177026
Diffstat (limited to 'gcc/ada/exp_util.adb')
-rw-r--r-- | gcc/ada/exp_util.adb | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 2740bd1..57f67e4 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -55,7 +55,6 @@ with Stringt; use Stringt; with Targparm; use Targparm; with Tbuild; use Tbuild; with Ttypes; use Ttypes; -with Uintp; use Uintp; with Urealp; use Urealp; with Validsw; use Validsw; @@ -2165,6 +2164,24 @@ package body Exp_Util is end; end Get_Current_Value_Condition; + --------------------- + -- Get_Stream_Size -- + --------------------- + + function Get_Stream_Size (E : Entity_Id) return Uint is + begin + -- If we have a Stream_Size clause for this type use it + + if Has_Stream_Size_Clause (E) then + return Static_Integer (Expression (Stream_Size_Clause (E))); + + -- Otherwise the Stream_Size if the size of the type + + else + return Esize (E); + end if; + end Get_Stream_Size; + --------------------------------- -- Has_Controlled_Coextensions -- --------------------------------- |