Skip to content
Snippets Groups Projects
Commit 313382da authored by Julien Signoles's avatar Julien Signoles Committed by Kostyantyn Vorobyov
Browse files

[typing] improve 'join' a bit (no visible effect)

parent 9fb2a830
No related branches found
No related tags found
No related merge requests found
......@@ -73,15 +73,14 @@ include Datatype.Make
(** Basic operations *)
(******************************************************************************)
let join ty1 ty2 =
if Options.Gmp_only.get () then Gmp
else
match ty1, ty2 with
| Other, Other -> Other
| Other, (Gmp | C_type _) | (Gmp | C_type _), Other ->
Options.fatal "[typing] join failure: integer and non integer type"
| Gmp, _ | _, Gmp -> Gmp
| C_type i1, C_type i2 ->
let join ty1 ty2 = match ty1, ty2 with
| Other, Other -> Other
| Other, (Gmp | C_type _) | (Gmp | C_type _), Other ->
Options.fatal "[typing] join failure: integer and non integer type"
| Gmp, _ | _, Gmp -> Gmp
| C_type i1, C_type i2 ->
if Options.Gmp_only.get () then Gmp
else
let ty = Cil.arithmeticConversion (TInt(i1, [])) (TInt(i2, [])) in
match ty with
| TInt(i, _) -> C_type i
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment