If both t1 and t2 are ptr_ctype_noderef then it should be ok to ignore the address-space of both (in the case of passing to printf style functions). Signed-off-by: Ben Dooks <ben.dooks@xxxxxxxxxxxxxxx> --- evaluate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/evaluate.c b/evaluate.c index 2a98a9b..0d5b8ad 100644 --- a/evaluate.c +++ b/evaluate.c @@ -718,7 +718,8 @@ const char *type_difference(struct ctype *c1, struct ctype *c2, /* XXX: we ought to compare sizes */ break; case SYM_PTR: - if (as1 != as2) + if (as1 != as2 && (t1 != &ptr_ctype_noderef && + t2 != &ptr_ctype_noderef)) return "different address spaces"; /* MOD_SPECIFIER is due to idiocy in parse.c */ if ((mod1 ^ mod2) & ~MOD_IGNORE & ~MOD_SPECIFIER) -- 2.19.1