p12tic / libsimdpp

Portable header-only C++ low level SIMD library
Boost Software License 1.0
1.24k stars 129 forks source link

uninitialized var warning in NEON variant of splat() #74

Closed peabody-korg closed 7 years ago

peabody-korg commented 7 years ago

simdpp::float32x4 foo1(float a) { return simdpp::splat(a); }

.../submodule/libsimdpp/simdpp/detail/insn/set_splat.h: In function ‘simdpp::arch_neonfltsp::float32x4 foo1(float)’: .../submodule/libsimdpp/simdpp/detail/insn/set_splat.h:302:43: warning: ‘r.simdpp::archneonfltsp::float32<4u>::d’ is used uninitialized in this function [-Wuninitialized] typename detail::remove_sign::type r;

aarch64-poky-linux-g++ (GCC) 6.3.0

define SIMDPP_ARCH_ARM_NEON_FLT_SP

p12tic commented 7 years ago

Thanks for the bug report. It looks the warning is wrong. Disabled it in b03d71eed805410e35ceb0d464ce3d2af7325f7e.