On Tue, Jul 31, 2012 at 1:16 AM, Philipp Klaus Krause <p...@spth.de> wrote: > This one doesn't make sense to me: For __GNUC__ it uses > implementation-defined non-standard stuff. For other compilers it > divides by zero, which is undefined behaviour. Why not use standard > macros NAN and INFINITY from math.h? The standard (section 7.12 in the > C11 standard, AFAIK the wording is the same in earlier standards) says > that they are provided if infinity and quit nan are supported by the > implementation. > > Philipp
Indeed. I wondered the same. The use of NAN/INF are inside an #if !defined(PIPE_CC_MSVC) block, so MSVC can't be the problem. NAN and INFINITY are c99, which I'm not sure we can assume. Then again, if not MSVC, what compiler is the problem? Vinson, does the attached patch work for you?
0001-Use-C99-NAN-and-INFINITY-macros.patch
Description: Binary data
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev