Skip to content

Commit 6247fd6

Browse files
committed
do not use disable diagnostics pragma for gcc or clang
1 parent d934b12 commit 6247fd6

File tree

4 files changed

+19
-14
lines changed

4 files changed

+19
-14
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ vignettes/jss.bst
66
debian
77
^.*\.Rproj$
88
^\.Rproj\.user$
9+
\.tar\.gz$

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
* inst/include/Eigen/src/Core/arch/CUDA/Half.h (Eigen): Condition use
44
of long long and unsigned long on C++11
55

6+
* inst/include/Eigen/src/Core/arch/SSE/Complex.h (Eigen): Comment-out
7+
use of diagnostic-suppressing pragma for gcc + clang to satisfy CRAN
8+
* inst/include/Eigen/src/Core/util/DisableStupidWarnings.h: Idem
9+
610
2018-02-04 Yixuan Qiu <yixuan.qiu@cos.name>
711

812
[ In RcppEigen 0.3.3.* branch ]

inst/include/Eigen/src/Core/arch/SSE/Complex.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ template<> EIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(const std::complex<flo
9898
res.v = _mm_loadl_pi(_mm_set1_ps(0.0f), reinterpret_cast<const __m64*>(&from));
9999
#elif EIGEN_GNUC_AT_LEAST(4,6)
100100
// Suppress annoying "may be used uninitialized in this function" warning with gcc >= 4.6
101-
#pragma GCC diagnostic push
102-
#pragma GCC diagnostic ignored "-Wuninitialized"
101+
// #pragma GCC diagnostic push
102+
// #pragma GCC diagnostic ignored "-Wuninitialized"
103103
res.v = _mm_loadl_pi(res.v, (const __m64*)&from);
104-
#pragma GCC diagnostic pop
104+
// #pragma GCC diagnostic pop
105105
#else
106106
res.v = _mm_loadl_pi(res.v, (const __m64*)&from);
107107
#endif

inst/include/Eigen/src/Core/util/DisableStupidWarnings.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,20 @@
3737
#elif defined __clang__
3838
// -Wconstant-logical-operand - warning: use of logical && with constant operand; switch to bitwise & or remove constant
3939
// this is really a stupid warning as it warns on compile-time expressions involving enums
40-
#ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
41-
#pragma clang diagnostic push
42-
#endif
43-
#pragma clang diagnostic ignored "-Wconstant-logical-operand"
44-
#if __clang_major__ >= 3 && __clang_minor__ >= 5
45-
#pragma clang diagnostic ignored "-Wabsolute-value"
46-
#endif
40+
// #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
41+
// #pragma clang diagnostic push
42+
// #endif
43+
// #pragma clang diagnostic ignored "-Wconstant-logical-operand"
44+
// #if __clang_major__ >= 3 && __clang_minor__ >= 5
45+
// #pragma clang diagnostic ignored "-Wabsolute-value"
46+
// #endif
4747

4848
#elif defined __GNUC__ && __GNUC__>=6
4949

50-
#ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
51-
#pragma GCC diagnostic push
52-
#endif
53-
#pragma GCC diagnostic ignored "-Wignored-attributes"
50+
// #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
51+
// #pragma GCC diagnostic push
52+
// #endif
53+
// #pragma GCC diagnostic ignored "-Wignored-attributes"
5454

5555
#endif
5656

0 commit comments

Comments
 (0)