diff options
author | 2009-09-15 10:09:19 +0000 | |
---|---|---|
committer | 2009-09-15 10:09:19 +0000 | |
commit | 1ebccda60b38b1a9f8005b6ebde93ecb10c8aa59 (patch) | |
tree | dfb12920003532e5794018ccdd7e22c6558714f9 /cfrontend | |
parent | 9534f73944ace0c005c39f560896b2271e496679 (diff) |
Problem with const enum initializers
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1146 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cfrontend')
-rw-r--r-- | cfrontend/Cil2Csyntax.ml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cfrontend/Cil2Csyntax.ml b/cfrontend/Cil2Csyntax.ml index 914f5ca..8538003 100644 --- a/cfrontend/Cil2Csyntax.ml +++ b/cfrontend/Cil2Csyntax.ml @@ -158,6 +158,8 @@ and eval_cast ty v = | TInt(ik, _), CInt64(v, _, _) -> mkint64 ik v | TInt(ik, _), CReal(v, _, _) -> if ik = IULongLong then raise NotConst else mkint64 ik (Int64.of_float v) + | TEnum _, CInt64(v, _, _) -> mkint64 IInt v + | TEnum _, CReal(v, _, _) -> mkint64 IInt (Int64.of_float v) | TFloat(fk, _), CReal(v, _, _) -> mkfloat fk v | TFloat(fk, _), CInt64(v, ik, _) -> if ik = IULongLong then raise NotConst else mkfloat fk (Int64.to_float v) |