diff options
author | Jakub Szewczyk <git@kubasz.xyz> | 2022-03-18 22:10:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-18 15:10:04 -0700 |
commit | 88c2e4377df7dbe65bc8ef629ea409cd9df6a860 (patch) | |
tree | 0fe699c08ef55ed5902304e55851cdb1796c6881 /src/support/utilities.cpp | |
parent | 967245fbc75217d257eeba15ede4aeb56e3c0d89 (diff) | |
download | binaryen-88c2e4377df7dbe65bc8ef629ea409cd9df6a860.tar.gz binaryen-88c2e4377df7dbe65bc8ef629ea409cd9df6a860.tar.bz2 binaryen-88c2e4377df7dbe65bc8ef629ea409cd9df6a860.zip |
Fix errors when building in C++20 mode (#4528)
* use [[noreturn]] available since C++11 instead of compiler-specific attributes
* replace deprecated std::is_pod with is_trivial&&is_standard_layout (also available since C++11/14)
* explicitly capture this in [=] lambdas
* extra const functions in FeatureSet, fix implicit cast warning by using the features field directly
* Use CMAKE_CXX_STANDARD to ensure the C++ standard parameter is set on all targets, remove manual compiler flag workaround.
Diffstat (limited to 'src/support/utilities.cpp')
-rw-r--r-- | src/support/utilities.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/support/utilities.cpp b/src/support/utilities.cpp index ea426df9c..f051a1871 100644 --- a/src/support/utilities.cpp +++ b/src/support/utilities.cpp @@ -24,9 +24,8 @@ #include "sanitizer/common_interface_defs.h" #endif -void wasm::handle_unreachable(const char* msg, - const char* file, - unsigned line) { +[[noreturn]] void +wasm::handle_unreachable(const char* msg, const char* file, unsigned line) { #ifndef NDEBUG if (msg) { std::cerr << msg << "\n"; |