Commit 0aa36101 authored by brianhall77's avatar brianhall77 Committed by Wouter van Oortmerssen

Portable range check for *cursor_ value. (#4582)

Avoids the following compile error when char is unsigned:

error: comparison of unsigned expression >= 0 is always true [-Werror,-Wtautological-unsigned-zero-compare]
parent 70f34501
......@@ -280,7 +280,7 @@ CheckedError Parser::Next() {
int unicode_high_surrogate = -1;
while (*cursor_ != c) {
if (*cursor_ < ' ' && *cursor_ >= 0)
if (*cursor_ < ' ' && static_cast<signed char>(*cursor_) >= 0)
return Error("illegal character in string constant");
if (*cursor_ == '\\') {
cursor_++;
......
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