From da8e99c5a70c0e0afff54d8202abbb0ae5e80662 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Mon, 16 Mar 2026 09:58:39 -0500 Subject: [PATCH] COMP: Suppress GCC -Wmaybe-uninitialized in Eigen3 SelfadjointMatrixVector GCC on aarch64 (ARM) emits a false-positive -Wmaybe-uninitialized warning at line 224 of SelfadjointMatrixVector.h. The dashboard script (itk_common.cmake) treats any build warning as CI failure. Add targeted GCC diagnostic pragmas to suppress the warning in this file only, scoped to GCC (not Clang) via __GNUC__ / __clang__ guards. Co-Authored-By: Claude Opus 4.6 --- .../Eigen/src/Core/products/SelfadjointMatrixVector.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Modules/ThirdParty/Eigen3/src/itkeigen/Eigen/src/Core/products/SelfadjointMatrixVector.h b/Modules/ThirdParty/Eigen3/src/itkeigen/Eigen/src/Core/products/SelfadjointMatrixVector.h index f7387601ffb..1b74a1d24fe 100644 --- a/Modules/ThirdParty/Eigen3/src/itkeigen/Eigen/src/Core/products/SelfadjointMatrixVector.h +++ b/Modules/ThirdParty/Eigen3/src/itkeigen/Eigen/src/Core/products/SelfadjointMatrixVector.h @@ -13,6 +13,13 @@ // IWYU pragma: private #include "../InternalHeaderCheck.h" +// GCC on ARM (aarch64) emits false-positive -Wmaybe-uninitialized warnings +// in the vectorized selfadjoint matrix-vector product kernel. +#if defined(__GNUC__) && !defined(__clang__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif + namespace Eigen { namespace internal { @@ -250,4 +257,8 @@ struct selfadjoint_product_impl { } // end namespace Eigen +#if defined(__GNUC__) && !defined(__clang__) +# pragma GCC diagnostic pop +#endif + #endif // EIGEN_SELFADJOINT_MATRIX_VECTOR_H