Skip to content

InverseSize4.h: warning C4068: unknown pragma 'GCC'

Hi there is a warning in InverseSize4.h when compiling with MSVC:

Eigen\src/LU/arch/InverseSize4.h(43,9): warning C4068: unknown pragma 'GCC'
Eigen\src/LU/arch/InverseSize4.h(44,9): warning C4068: unknown pragma 'GCC'
Eigen\src/LU/arch/InverseSize4.h(362,9): warning C4068: unknown pragma 'GCC'

It is coming from:

#if !EIGEN_COMP_LLVM
// These routines requires bit manipulation of the sign, which is not compatible
// with fastmath.
#pragma GCC push_options
#pragma GCC optimize ("no-fast-math")
#endif

and

#if !EIGEN_COMP_LLVM
#pragma GCC pop_options
#endif

I'm not very familiar with all those compiler, but a #if EIGEN_COMP_GNUC seems more appropriate.

Have a nice day.