Skip to content

Commit

Permalink
Ignore top level qualifiers in __builtin_types_compatible_p
Browse files Browse the repository at this point in the history
  • Loading branch information
karoliineh committed Oct 2, 2023
1 parent e9060b8 commit cd07bb1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/frontc/cabs2cil.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4658,7 +4658,8 @@ and doExp (asconst: bool) (* This expression is used as a constant *)
prechunk := (fun _ -> empty);
piscall := false;
let compatible =
try ignore(combineTypes CombineOther t1 t2); true
(* This built-in function ignores top level qualifiers (e.g., const, volatile). *)
try ignore(combineTypes CombineOther (removeOuterQualifierAttributes t1) (removeOuterQualifierAttributes t2)); true
with Failure _ -> false
in
if compatible then
Expand Down

0 comments on commit cd07bb1

Please sign in to comment.