Commit 69b900dd authored by Milad Fa's avatar Milad Fa Committed by V8 LUCI CQ

Fix compilation with gcc

Currently getting the following errors:
```
 error: suggest parentheses around comparison in operand of '!='
```

Bug: v8:10776
Change-Id: I1c7e95470462efcc33f90bf015b37373472e32b6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3707653Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#81187}
parent f3ba6b59
......@@ -1894,14 +1894,14 @@ bool StrDecimalLiteral::IsLessThan(const StrDecimalLiteral& y) const {
return negative_;
}
if (exp_value_ != y.exp_value_) {
return exp_value_ < y.exp_value_ != negative_;
return (exp_value_ < y.exp_value_) != negative_;
}
int length = std::max(y.length(), this->length());
for (int i = 0; i < length; i++) {
int dx = Digit(i);
int dy = y.Digit(i);
if (dx != dy) {
return dx < dy != negative_;
return (dx < dy) != negative_;
}
}
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment