Taking a step back. I ask myself, what is epicsMathTest actually testing? To me it's about runtime behavior. "Inf + - Inf" is nonsense which wouldn't be found in a real source file, so the fact that the MSVC optimizer gets it wrong is interesting, but ultimately a distraction.
While not the best solution. Absent fine grained control of the optimizer, maybe the path forward is to disable optimizations (only) in epicsMathTest.c and/or epicsCalcTest.c ? Or at least around the NaN and Inf tests?
Taking a step back. I ask myself, what is epicsMathTest actually testing? To me it's about runtime behavior. "Inf + - Inf" is nonsense which wouldn't be found in a real source file, so the fact that the MSVC optimizer gets it wrong is interesting, but ultimately a distraction.
While not the best solution. Absent fine grained control of the optimizer, maybe the path forward is to disable optimizations (only) in epicsMathTest.c and/or epicsCalcTest.c ? Or at least around the NaN and Inf tests?
> #if defined(_MSC_VER)
> # pragma optimize("g", off)
> #endif