mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 04:35:57 +08:00
Suppress annoying "may be used uninitialized in this function" warning with gcc >= 4.6
This commit is contained in:
parent
b74c0a4413
commit
e4ec63aee7
@ -88,8 +88,14 @@ template<> EIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(const std::complex<flo
|
||||
{
|
||||
Packet2cf res;
|
||||
#if EIGEN_GNUC_AT_MOST(4,2)
|
||||
// workaround annoying "may be used uninitialized in this function" warning with gcc 4.2
|
||||
// Workaround annoying "may be used uninitialized in this function" warning with gcc 4.2
|
||||
res.v = _mm_loadl_pi(_mm_set1_ps(0.0f), reinterpret_cast<const __m64*>(&from));
|
||||
#elif EIGEN_GNUC_AT_LEAST(4,6)
|
||||
// Suppress annoying "may be used uninitialized in this function" warning with gcc >= 4.6
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wuninitialized"
|
||||
res.v = _mm_loadl_pi(res.v, (const __m64*)&from);
|
||||
#pragma GCC diagnostic pop
|
||||
#else
|
||||
res.v = _mm_loadl_pi(res.v, (const __m64*)&from);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user