Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 1 addition & 25 deletions src/support/small_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,10 @@

namespace wasm {

// We don't understand this warning, only here and only on aarch64 and riscv64,
// 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

// https://github.com/WebAssembly/binaryen/issues/6410
#if defined(__riscv) && __riscv_xlen == 64
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuninitialized"
#endif

template<typename T, size_t N> class SmallVector {
// fixed-space storage
size_t usedFixed = 0;
std::array<T, N> fixed;
std::array<T, N> fixed{};

// flexible additional storage
std::vector<T> flexible;
Expand Down Expand Up @@ -246,14 +230,6 @@ struct ZeroInitSmallVector : public SmallVector<T, N> {
}
};

#if defined(__aarch64__)
#pragma GCC diagnostic pop
#endif

#if defined(__riscv) && __riscv_xlen == 64
#pragma GCC diagnostic pop
#endif

} // namespace wasm

#endif // wasm_support_small_vector_h
Loading