diff --git a/src/Functions/negate.cpp b/src/Functions/negate.cpp index 39ca434ea89..3101513648b 100644 --- a/src/Functions/negate.cpp +++ b/src/Functions/negate.cpp @@ -13,7 +13,14 @@ struct NegateImpl static inline NO_SANITIZE_UNDEFINED ResultType apply(A a) { - return -static_cast(a); +#if defined (__GNUC__) && __GNUC__ >= 10 + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wvector-operation-performance" +#endif + return -(static_cast(a)); +#if defined (__GNUC__) && __GNUC__ >= 10 + #pragma GCC diagnostic pop +#endif } #if USE_EMBEDDED_COMPILER