summaryrefslogtreecommitdiff
path: root/gcc/ada/s-fatgen.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-04 09:47:14 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-04 09:47:14 +0000
commitc7cbf4a0641c50f40c80398eec7212bc27b436b1 (patch)
treec9ba49866405f3050bb8de2fdb43f2badcc1cdb4 /gcc/ada/s-fatgen.adb
parent718d0d923f1c111499270c4c98db67f6bb848e49 (diff)
downloadgcc-c7cbf4a0641c50f40c80398eec7212bc27b436b1.tar.gz
2014-08-04 Robert Dewar <dewar@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference, case Pred): Remove special test for Float'First, no longer required. (Expand_N_Attribute_Reference, case Succ): Remove special test for Float'First, no longer required. * s-fatgen.adb (Pred): return infinity unchanged. (Succ): ditto. 2014-08-04 Claire Dross <dross@adacore.com> * sem_ch12.adb (Analyze_Associations): Defaults should only be used if there is no explicit match. * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity): Also check for pragma external_axiomatization on generic units. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213546 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-fatgen.adb')
-rw-r--r--gcc/ada/s-fatgen.adb10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ada/s-fatgen.adb b/gcc/ada/s-fatgen.adb
index 62534f67c38..1f4c4985762 100644
--- a/gcc/ada/s-fatgen.adb
+++ b/gcc/ada/s-fatgen.adb
@@ -426,6 +426,11 @@ package body System.Fat_Gen is
return X / (X - X);
end if;
+ -- For infinities, return unchanged
+
+ elsif X < T'First or else X > T'Last then
+ return X;
+
-- Subtract from the given number a number equivalent to the value
-- of its least significant bit. Given that the most significant bit
-- represents a value of 1.0 * radix ** (exp - 1), the value we want
@@ -675,6 +680,11 @@ package body System.Fat_Gen is
return X / (X - X);
end if;
+ -- For infinities, return unchanged
+
+ elsif X < T'First or else X > T'Last then
+ return X;
+
-- Add to the given number a number equivalent to the value
-- of its least significant bit. Given that the most significant bit
-- represents a value of 1.0 * radix ** (exp - 1), the value we want