Skip to content

Commit

Permalink
Fix enumerator attribute merging like fieldinfo merging
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Aug 2, 2024
1 parent ead4987 commit 0d21b34
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mergecil.ml
Original file line number Diff line number Diff line change
Expand Up @@ -701,9 +701,11 @@
(* We check that they are defined in the same way. This is a fairly
conservative check. *)
List.iter2
(fun (old_iname, old_attrs, old_iv, _) (iname, attrs, iv, _) -> (* TODO: combine attributes somewhere? *)
(fun (old_iname, old_attrs, old_iv, _) (iname, attrs, iv, _) ->
if old_iname <> iname then
raise (Failure "(different names for enumeration items)");
if old_attrs <> attrs then
raise (Failure "(different enumerator attributes)");
let samev =
match (constFold true old_iv, constFold true iv) with
| Const (CInt (oldi, _, _)), Const (CInt (i, _, _)) ->
Expand Down

0 comments on commit 0d21b34

Please sign in to comment.