Files
allwpilib/upstream_utils/eigen_patches/0001-Disable-warnings.patch
Tyler Veness fff4d1f44e [wpimath] Extend Eigen warning suppression to GCC 12 (#4251)
It originally only applied to GCC 11. The CMake build passed without
this change, but not the Gradle build.
2022-05-19 18:50:29 -07:00

32 lines
961 B
Diff

From bfd3aa822ff70908c44ad2880b91d9a8dbc1ce7e Mon Sep 17 00:00:00 2001
From: Tyler Veness <calcmogul@gmail.com>
Date: Wed, 18 May 2022 09:14:24 -0700
Subject: [PATCH] Disable warnings
---
Eigen/src/Core/util/DisableStupidWarnings.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Eigen/src/Core/util/DisableStupidWarnings.h b/Eigen/src/Core/util/DisableStupidWarnings.h
index fe0cfec0b..9e8a0e7a9 100755
--- a/Eigen/src/Core/util/DisableStupidWarnings.h
+++ b/Eigen/src/Core/util/DisableStupidWarnings.h
@@ -71,6 +71,14 @@
// See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89325
#pragma GCC diagnostic ignored "-Wattributes"
#endif
+ #if __GNUC__>=11
+ // This warning is a false positive
+ #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+ #endif
+ #if __GNUC__==12
+ // This warning is a false positive
+ #pragma GCC diagnostic ignored "-Warray-bounds"
+ #endif
#endif
#if defined __NVCC__
--
2.36.1