summaryrefslogtreecommitdiff
path: root/src/support/small_vector.h
diff options
context:
space:
mode:
authorDarren Worrall <DazWorrall@users.noreply.github.com>2024-02-21 22:48:35 +0000
committerGitHub <noreply@github.com>2024-02-21 14:48:35 -0800
commit93b497068746283a786b045046afd1f4608ccfa3 (patch)
tree461181e253d4608b3e4b36fc9f6b6c6b5b561b40 /src/support/small_vector.h
parent39ae6cf367fced5aad3224c6bffa086b0cd0d393 (diff)
downloadbinaryen-93b497068746283a786b045046afd1f4608ccfa3.tar.gz
binaryen-93b497068746283a786b045046afd1f4608ccfa3.tar.bz2
binaryen-93b497068746283a786b045046afd1f4608ccfa3.zip
Fix build error on aarch64 [NFC] (#6330)
Diffstat (limited to 'src/support/small_vector.h')
-rw-r--r--src/support/small_vector.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/support/small_vector.h b/src/support/small_vector.h
index 9ef90d83a..19ceb8697 100644
--- a/src/support/small_vector.h
+++ b/src/support/small_vector.h
@@ -29,6 +29,16 @@
namespace wasm {
+// We don't understand this warning, only here and only on aarch64,
+// we suspect it's spurious so disabling for now.
+//
+// For context: https://github.com/WebAssembly/binaryen/issues/6311
+
+#if defined(__aarch64__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif
+
template<typename T, size_t N> class SmallVector {
// fixed-space storage
size_t usedFixed = 0;
@@ -37,6 +47,10 @@ template<typename T, size_t N> class SmallVector {
// flexible additional storage
std::vector<T> flexible;
+#if defined(__aarch64__)
+#pragma GCC diagnostic pop
+#endif
+
public:
using value_type = T;