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 ...@@ -73,15 +73,14 @@ include Datatype.Make
(** Basic operations *) (** Basic operations *)
(******************************************************************************) (******************************************************************************)
let join ty1 ty2 = let join ty1 ty2 = match ty1, ty2 with
if Options.Gmp_only.get () then Gmp | Other, Other -> Other
else | Other, (Gmp | C_type _) | (Gmp | C_type _), Other ->
match ty1, ty2 with Options.fatal "[typing] join failure: integer and non integer type"
| Other, Other -> Other | Gmp, _ | _, Gmp -> Gmp
| Other, (Gmp | C_type _) | (Gmp | C_type _), Other -> | C_type i1, C_type i2 ->
Options.fatal "[typing] join failure: integer and non integer type" if Options.Gmp_only.get () then Gmp
| Gmp, _ | _, Gmp -> Gmp else
| C_type i1, C_type i2 ->
let ty = Cil.arithmeticConversion (TInt(i1, [])) (TInt(i2, [])) in let ty = Cil.arithmeticConversion (TInt(i1, [])) (TInt(i2, [])) in
match ty with match ty with
| TInt(i, _) -> C_type i | 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