build: add missing GCC condition for pragma

pull/22295/head
Alexander Alekhin 2 years ago
parent db53f4533e
commit 85b0b0cd77
  1. 5
      modules/features2d/src/sift.simd.hpp

@ -829,14 +829,19 @@ else // CV_8U
v_pack_store(dst + k, __pack01);
}
#endif
#if defined(__GNUC__) && __GNUC__ >= 9
// avoid warning "iteration 7 invokes undefined behavior" on Linux ARM64
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Waggressive-loop-optimizations"
#endif
for( ; k < len; k++ )
{
dst[k] = saturate_cast<uchar>(rawDst[k]*nrm2);
}
#if defined(__GNUC__) && __GNUC__ >= 9
#pragma GCC diagnostic pop
#endif
}
#else
float* dst = dstMat.ptr<float>(row);

Loading…
Cancel
Save