diff options
author | Wouter van Oortmerssen <aardappel@gmail.com> | 2021-08-05 16:10:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-05 16:10:52 -0700 |
commit | 3c87c8059301f8c0672487a3e4a61cdcafee23c8 (patch) | |
tree | 9166bd0d901ff956b6dcaf92d6eea8629db6fd8c | |
parent | c7e5b6f24e0e1fb7afb0b98926a1a08516e83b42 (diff) | |
download | binaryen-3c87c8059301f8c0672487a3e4a61cdcafee23c8.tar.gz binaryen-3c87c8059301f8c0672487a3e4a61cdcafee23c8.tar.bz2 binaryen-3c87c8059301f8c0672487a3e4a61cdcafee23c8.zip |
Clean up warnings on MSVC (#4060)
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/tools/wasm-shell.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 45b4a0282..037ae4a45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -166,6 +166,8 @@ if(MSVC) add_nondebug_compile_flag("/O2") add_compile_flag("/D_CRT_SECURE_NO_WARNINGS") add_compile_flag("/D_SCL_SECURE_NO_WARNINGS") + # workaround for https://github.com/WebAssembly/binaryen/issues/3661 + add_compile_flag("/D_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING") # Visual Studio 2018 15.8 implemented conformant support for std::aligned_storage, but the conformant support is only enabled when the following flag is passed, to avoid # breaking backwards compatibility with code that relied on the non-conformant behavior (the old nonconformant behavior is not used with Binaryen) add_compile_flag("/D_ENABLE_EXTENDED_ALIGNED_STORAGE") diff --git a/src/tools/wasm-shell.cpp b/src/tools/wasm-shell.cpp index c6815c92d..9b8e7ff28 100644 --- a/src/tools/wasm-shell.cpp +++ b/src/tools/wasm-shell.cpp @@ -327,7 +327,7 @@ protected: Builder::Immutable)); spectest->addGlobal(builder.makeGlobal(Name::fromInt(2), Type::f32, - builder.makeConst<float>(666.6), + builder.makeConst<float>(666.6f), Builder::Immutable)); spectest->addGlobal(builder.makeGlobal(Name::fromInt(3), Type::f64, |