diff --git a/convert.ml b/convert.ml index 3a81aa891f04e3c04a7ce848f2f24a88493caba4..a793c7c941d42a1efb8e5c3dbf68a5d39551582f 100644 --- a/convert.ml +++ b/convert.ml @@ -2043,16 +2043,7 @@ and convert_initializer env typ var init_exp does_remove_virtual = loc) in let eidx = { expr_loc = loc; expr_node = VARIABLE idx } in - let end_test = - { expr_loc = loc; - expr_node = - BINARY( - LT, - eidx, - { expr_loc = loc; - expr_node = - CONSTANT (CONST_INT (Int64.to_string v)) }) } - in + let end_test = mk_expr env (BINARY(LT,eidx,mk_int64_cst env v)) in let increment = { expr_loc = loc; expr_node = UNARY(POSINCR, eidx)} in @@ -2532,9 +2523,7 @@ let convert_static_const env loc name ikind kind value does_remove_virtual = | ICStaticConst -> SpecStorage STATIC :: spec | ICLiteral | ICExternConst -> spec in - let init = { expr_loc = cloc; - expr_node = CONSTANT (CONST_INT (Int64.to_string value))} - in + let init = mk_int64_cst env value in let env = Convert_env.add_global_var env qualified_name plain in DECDEF(None,(spec,[(name,JUSTBASE,[],cloc),SINGLE_INIT init]),cloc), env