aboutsummaryrefslogtreecommitdiffstats
path: root/cparser
diff options
context:
space:
mode:
Diffstat (limited to 'cparser')
-rw-r--r--cparser/Elab.ml1
1 files changed, 1 insertions, 0 deletions
diff --git a/cparser/Elab.ml b/cparser/Elab.ml
index 074779ca..f203c777 100644
--- a/cparser/Elab.ml
+++ b/cparser/Elab.ml
@@ -1854,6 +1854,7 @@ let elab_expr vararg loc env a =
err "%a and %a are not pointers to compatible types"
(print_typ env) b1.etyp (print_typ env) b1.etyp;
check_ptr_arith env ty1 '-';
+ check_ptr_arith env ty2 '-';
if wrap sizeof loc env ty1 = Some 0 then
err "subtraction between two pointers to zero-sized objects";
(TPtr(ty1, []), TInt(ptrdiff_t_ikind(), []))