Michael Goffioul wrote: > I encountered a compilation error with MSVC when compiling floor.c in > strict floating-point mode (-fp:strict). The error is: > > "error C2099: initializer is not a constant" > > The error is triggered by the initializer for the constant variable > TWO_MANT_DIG and is documented here: > > http://msdn.microsoft.com/en-us/library/t801az8a(v=vs.80).aspx
Does adding the line #pragma fenv_access (off) before the initialization help? *** lib/floor.c.orig Thu Feb 23 11:11:48 2012 --- lib/floor.c Thu Feb 23 11:11:43 2012 *************** *** 42,47 **** --- 42,51 ---- # define L_(literal) literal##f #endif + #ifdef _MSC_VER + # pragma fenv_access (off) + #endif + /* 2^(MANT_DIG-1). */ static const DOUBLE TWO_MANT_DIG = /* Assume MANT_DIG <= 5 * 31.