From c9bcf39a2ad78c7bc9cbfaab43e03771899cfa44 Mon Sep 17 00:00:00 2001 From: lemon Date: Mon, 22 Aug 2022 13:07:20 +0200 Subject: ir --- bootstrap/parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap/parse.c b/bootstrap/parse.c index 91c7567..99d317a 100644 --- a/bootstrap/parse.c +++ b/bootstrap/parse.c @@ -1809,7 +1809,7 @@ pexlog(struct parser *P) { struct expr rhs = pexcmp(P); if (tokt == '?\?') { const struct type *ty = typeof2(ex.ty, rhs.ty); - if (ex.ty->t != TYptr || rhs.ty->t != TYptr || !ty) + if (!(ex.ty->t == TYptr || rhs.ty->t == TYptr) || !ty) fatal(P, tok.span, "invalid operands %t and %t to binary operator %k", ex.ty, rhs.ty, tok.t); -- cgit v1.2.3