From c8e492d82fc3a7cd13e05dff8db75f0de5b02890 Mon Sep 17 00:00:00 2001 From: jbrodman Date: Wed, 29 Apr 2015 18:30:21 -0400 Subject: [PATCH] Ptr Diff should ignore const --- expr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/expr.cpp b/expr.cpp index 006e179d..e829f578 100644 --- a/expr.cpp +++ b/expr.cpp @@ -1461,7 +1461,7 @@ lEmitBinaryPointerArith(BinaryExpr::Op op, llvm::Value *value0, break; case BinaryExpr::Sub: { if (CastType(type1) != NULL) { - AssertPos(pos, Type::Equal(type0, type1)); + AssertPos(pos, Type::EqualIgnoringConst(type0, type1)); if (ptrType->IsSlice()) { llvm::Value *p0 = ctx->ExtractInst(value0, 0);