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 Jul 22, 2017
1 parent 90c064c commit 59abe28
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 59abe28

Please sign in to comment.