Scope GCC diagnostic suppression in RVV intrinsics

This commit is contained in:
yqtian-se
2026-09-18 12:37:29 +00:00
parent cf66d2c6ad
commit ffaa389415

View File

@@ -13,9 +13,8 @@
#include <opencv2/core/check.hpp>
#if defined(__GNUC__) && !defined(__clang__)
// FIXIT: eliminate massive warnigs from templates
// GCC from 'rvv-next': riscv64-unknown-linux-gnu-g++ (g42df3464463) 12.0.1 20220505 (prerelease)
// doesn't work: #pragma GCC diagnostic push
// Suppress warnings from RVV vector types without changing includer state.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wignored-attributes"
#endif
@@ -2200,4 +2199,8 @@ CV_CPU_OPTIMIZATION_HAL_NAMESPACE_END
} //namespace cv
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif
#endif //OPENCV_HAL_INTRIN_RVV_SCALABLE_HPP