diff options
Diffstat (limited to 'src/emscripten-optimizer/simple_ast.h')
-rw-r--r-- | src/emscripten-optimizer/simple_ast.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/emscripten-optimizer/simple_ast.h b/src/emscripten-optimizer/simple_ast.h index d74321aa7..cc07d8a12 100644 --- a/src/emscripten-optimizer/simple_ast.h +++ b/src/emscripten-optimizer/simple_ast.h @@ -27,6 +27,7 @@ #include <ostream> #include <iostream> #include <iomanip> +#include <limits> #include <functional> #include <algorithm> #include <set> @@ -837,7 +838,8 @@ struct JSPrinter { #define BUFFERSIZE 1000 static char full_storage_f[BUFFERSIZE], full_storage_e[BUFFERSIZE]; // f is normal, e is scientific for float, x for integer static char *storage_f = full_storage_f + 1, *storage_e = full_storage_e + 1; // full has one more char, for a possible '-' - double err_f, err_e; + auto err_f = std::numeric_limits<double>::quiet_NaN(); + auto err_e = std::numeric_limits<double>::quiet_NaN(); for (int e = 0; e <= 1; e++) { char *buffer = e ? storage_e : storage_f; double temp; |