aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap/parse.c')
-rw-r--r--bootstrap/parse.c2
1 files changed, 1 insertions, 1 deletions
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);