From 17f519651feb4a09aa90c89c949469e8a5ab0e88 Mon Sep 17 00:00:00 2001 From: xleroy Date: Sun, 17 Aug 2014 07:52:12 +0000 Subject: - Support "switch" statements over 64-bit integers (in CompCert C to Cminor, included) - Translation of "switch" to decision trees or jumptables made generic over the sizes of integers and moved to the Cminor->CminorSel pass instead of CminorSel->RTL as before. - CminorSel: add "exitexpr" to support the above. - ValueDomain: more precise analysis of comparisons against an integer literal. E.g. "x >=u 0" is always true. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2565 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- cfrontend/C2C.ml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'cfrontend/C2C.ml') diff --git a/cfrontend/C2C.ml b/cfrontend/C2C.ml index 6ee217c..702fcf2 100644 --- a/cfrontend/C2C.ml +++ b/cfrontend/C2C.ml @@ -765,8 +765,6 @@ let rec convertStmt ploc env s = | C.Scontinue -> Scontinue | C.Sswitch(e, s1) -> - if is_longlong env e.etyp then - unsupported "'switch' on an argument of type 'long long'"; let (init, cases) = groupSwitch (flattenSwitch s1) in if cases = [] then unsupported "ill-formed 'switch' statement"; @@ -810,7 +808,7 @@ and convertSwitch ploc env = function match Ceval.integer_expr env e with | None -> unsupported "'case' label is not a compile-time integer"; None - | Some v -> Some (convertInt v) + | Some v -> Some (Z.of_uint64 v) in LScons(lbl', convertStmt ploc env s, convertSwitch s.sloc env rem) -- cgit v1.2.3