diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-05 14:57:42 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-05 14:57:42 +0000 |
commit | d24d7e81b6a309d113bc69412592c363733bc095 (patch) | |
tree | 2d91f19f11f8b38d7d3f5b5cf90649006ce6ddb8 /gcc/ada/eval_fat.adb | |
parent | 66d12a6c0042f50195e3775da6684f7455019f15 (diff) | |
download | gcc-d24d7e81b6a309d113bc69412592c363733bc095.tar.gz |
2004-04-05 Vincent Celier <celier@gnat.com>
* adaint.h, adaint.c: Add function __gnat_named_file_length
* impunit.adb: Add Ada.Directories to the list
* Makefile.in: Add VMS and Windows versions of
Ada.Directories.Validity package body.
* Makefile.rtl: Add a-direct and a-dirval
* mlib-tgt.ads: Minor comment update.
* a-dirval.ads, a-dirval.adb, 5vdirval.adb, 5wdirval.adb,
a-direct.ads, a-direct.adb: New files.
2004-04-05 Vincent Celier <celier@gnat.com>
PR ada/13620
* make.adb (Scan_Make_Arg): Pass any -fxxx switches to gnatlink, not
just to the compiler.
2004-04-05 Robert Dewar <dewar@gnat.com>
* a-except.adb (Exception_Name_Simple): Make sure lower bound of
returned string is 1.
* ali-util.adb: Use proper specific form for Warnings (Off, entity)
* eval_fat.ads: Minor reformatting
* g-curexc.ads: Document that lower bound of returned string values
is always one.
* gnatlink.adb: Add ??? comment for previous change
(need to document why this is VMS specific)
* s-stoele.ads: Minor reformatting
* tbuild.ads: Minor reformatting throughout (new function specs)
* par-ch10.adb (P_Context_Clause): Handle comma instead of semicolon
after WITH.
* scng.adb: Minor reformatting
2004-04-05 Geert Bosch <bosch@gnat.com>
* eval_fat.adb (Machine): Remove unnecessary suppression of warning.
(Leading_Part): Still perform truncation to machine number if the
specified radix_digits is greater or equal to machine_mantissa.
2004-04-05 Javier Miranda <miranda@gnat.com>
* par-ch3.adb: Complete documentation of previous change
Correct wrong syntax documentation of the OBJECT_DECLARATION rule
(aliased must appear before constant).
* par-ch4.adb: Complete documentation of previous change.
* par-ch6.adb: Complete documentation of previous change.
* sinfo.ads: Fix typo in commment.
2004-04-05 Ed Schonberg <schonberg@gnat.com>
* sem_ch3.adb (Inherit_Components): If derived type is private and has
stored discriminants, use its discriminants to constrain parent type,
as is done for non-private derived record types.
* sem_ch4.adb (Remove_Abstract_Operations): New subprogram to implement
Ada 2005 AI-310: an abstract non-dispatching operation is not a
candidate interpretation in an overloaded call.
* tbuild.adb (Unchecked_Convert_To): Preserve conversion node if
expression is Null and target type is not an access type (e.g. a
non-private address type).
2004-04-05 Thomas Quinot <quinot@act-europe.fr>
* exp_ch6.adb (Rewrite_Function_Call): When rewriting an assignment
statement whose right-hand side is an inlined call, save a copy of the
original assignment subtree to preserve enough consistency for
Analyze_Assignment to proceed.
* sem_ch5.adb (Analyze_Assignment): Remove a costly copy of the
complete assignment subtree which is now unnecessary, as the expansion
of inlined call has been improved to preserve a consistent assignment
tree. Note_Possible_Modification must be called only
after checks have been applied, or else unnecessary checks will
be generated.
* sem_util.adb (Note_Possible_Modification): Reorganise the handling
of explicit dereferences that do not Come_From_Source:
- be selective on cases where we must go back to the dereferenced
pointer (an assignment to an implicit dereference must not be
recorded as modifying the pointer);
- do not rely on Original_Node being present (Analyze_Assignment
calls Note_Possible_Modification on a copied tree).
* sem_warn.adb (Check_References): When an unset reference to a pointer
that is never assigned is encountered, prefer '<pointer> may be null'
warning over '<pointer> is never assigned a value'.
2004-04-05 Ramon Fernandez <fernandez@gnat.com>
* tracebak.c: Change STOP_FRAME in ppc vxworks to be compliant with
the ABI.
2004-04-05 Olivier Hainque <hainque@act-europe.fr>
* 5gmastop.adb (Pop_Frame): Comment out the pragma Linker_Option for
libexc. We currently don't reference anything in this library and
linking it in triggers linker warnings we don't want to see.
* init.c: Update comments.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80431 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/eval_fat.adb')
-rw-r--r-- | gcc/ada/eval_fat.adb | 58 |
1 files changed, 22 insertions, 36 deletions
diff --git a/gcc/ada/eval_fat.adb b/gcc/ada/eval_fat.adb index f8d14bfe2fa..2a5357cb311 100644 --- a/gcc/ada/eval_fat.adb +++ b/gcc/ada/eval_fat.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2003 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2004 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- -- @@ -62,11 +62,11 @@ package body Eval_Fat is -- The result is rounded to a nearest machine number. procedure Decompose_Int - (RT : R; - X : in T; - Fraction : out UI; - Exponent : out UI; - Mode : Rounding_Mode); + (RT : R; + X : in T; + Fraction : out UI; + Exponent : out UI; + Mode : Rounding_Mode); -- This is similar to Decompose, except that the Fraction value returned -- is an integer representing the value Fraction * Scale, where Scale is -- the value (Radix ** Machine_Mantissa (RT)). The value is obtained by @@ -129,7 +129,6 @@ package body Eval_Fat is function Compose (RT : R; Fraction : T; Exponent : UI) return T is Arg_Frac : T; Arg_Exp : UI; - begin if UR_Is_Zero (Fraction) then return Fraction; @@ -190,18 +189,17 @@ package body Eval_Fat is -- Decompose_Int -- ------------------- - -- This procedure should be modified with care, as there - -- are many non-obvious details that may cause problems - -- that are hard to detect. The cases of positive and - -- negative zeroes are also special and should be - -- verified separately. + -- This procedure should be modified with care, as there are many + -- non-obvious details that may cause problems that are hard to + -- detect. The cases of positive and negative zeroes are also + -- special and should be verified separately. procedure Decompose_Int - (RT : R; - X : in T; - Fraction : out UI; - Exponent : out UI; - Mode : Rounding_Mode) + (RT : R; + X : in T; + Fraction : out UI; + Exponent : out UI; + Mode : Rounding_Mode) is Base : Int := Rbase (X); N : UI := abs Numerator (X); @@ -466,7 +464,6 @@ package body Eval_Fat is function Exponent (RT : R; X : T) return UI is X_Frac : UI; X_Exp : UI; - begin if UR_Is_Zero (X) then return Uint_0; @@ -502,7 +499,6 @@ package body Eval_Fat is function Fraction (RT : R; X : T) return T is X_Frac : T; X_Exp : UI; - begin if UR_Is_Zero (X) then return X; @@ -517,19 +513,13 @@ package body Eval_Fat is ------------------ function Leading_Part (RT : R; X : T; Radix_Digits : UI) return T is - L : UI; - Y, Z : T; - + RD : constant UI := UI_Min (Radix_Digits, Machine_Mantissa (RT)); + L : UI; + Y : T; begin - if Radix_Digits >= Machine_Mantissa (RT) then - return X; - - else - L := Exponent (RT, X) - Radix_Digits; - Y := Truncation (RT, Scaling (RT, X, -L)); - Z := Scaling (RT, Y, L); - return Z; - end if; + L := Exponent (RT, X) - RD; + Y := UR_From_Uint (UR_Trunc (Scaling (RT, X, -L))); + return Scaling (RT, Y, L); end Leading_Part; ------------- @@ -540,11 +530,8 @@ package body Eval_Fat is (RT : R; X : T; Mode : Rounding_Mode; - Enode : Node_Id) - return T + Enode : Node_Id) return T is - pragma Warnings (Off, Enode); -- not yet referenced - X_Frac : T; X_Exp : UI; Emin : constant UI := UI_From_Int (Machine_Emin (RT)); @@ -726,7 +713,6 @@ package body Eval_Fat is function Model (RT : R; X : T) return T is X_Frac : T; X_Exp : UI; - begin Decompose (RT, X, X_Frac, X_Exp); return Compose (RT, X_Frac, X_Exp); |