Skip to content

Commit

Permalink
src: fix building on the old gcc versions
Browse files Browse the repository at this point in the history
PR-URL: #264
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
  • Loading branch information
belochub committed Jan 22, 2018
1 parent 8130a0e commit f2b92df
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ using std::function;
using std::isalnum;
using std::isalpha;
using std::isdigit;
using std::isinf;
using std::isnan;
using std::isxdigit;
using std::memcpy;
using std::memset;
Expand Down Expand Up @@ -359,12 +357,12 @@ MaybeLocal<Value> ParseDecimalNumber(Isolate* isolate,
}

// strictly allow only "NaN" and "Infinity"
if (isnan(number)) {
if (std::isnan(number)) {
if (strncmp(begin + 1, "aN", 2) != 0) {
THROW_EXCEPTION(SyntaxError, "Invalid format: expected NaN");
return MaybeLocal<Value>();
}
} else if (isinf(number)) {
} else if (std::isinf(number)) {
if (strncmp(begin + 1, "nfinity", 7) != 0) {
THROW_EXCEPTION(SyntaxError, "Invalid format: expected Infinity");
return MaybeLocal<Value>();
Expand Down

0 comments on commit f2b92df

Please sign in to comment.