summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-10-28 14:56:39 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-10-28 14:56:39 +0000
commit14a9bb4b267eeead8cd9503ee19e860a8bc0d763 (patch)
treec70dda532a974a7b62969c6b199b80d65784dc91 /common
parentb54721f58c2ecb65ce554d8b34f214d5121a2b0c (diff)
Float.intoffloat and Float.intuoffloat are now partial functions.
(May fail if float is too big to be converted.) git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1544 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'common')
-rw-r--r--common/Values.v4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/Values.v b/common/Values.v
index af242c9..ceff333 100644
--- a/common/Values.v
+++ b/common/Values.v
@@ -117,13 +117,13 @@ Definition absf (v: val) : val :=
Definition intoffloat (v: val) : val :=
match v with
- | Vfloat f => Vint (Float.intoffloat f)
+ | Vfloat f => match Float.intoffloat f with Some n => Vint n | None => Vundef end
| _ => Vundef
end.
Definition intuoffloat (v: val) : val :=
match v with
- | Vfloat f => Vint (Float.intuoffloat f)
+ | Vfloat f => match Float.intuoffloat f with Some n => Vint n | None => Vundef end
| _ => Vundef
end.