[Mesa-dev] [PATCH] glsl: Fix isinf() for non-C99-compliant compilers.
stereotype441 at gmail.com
Wed Jan 18 13:09:31 PST 2012
On 18 January 2012 12:43, Jose Fonseca <jfonseca at vmware.com> wrote:
> Looks good to me. Thanks
> Should there be a case for -INF while we are at it?
I think you can make arguments both for and against. On the one hand, C99
requires strtod to recognize "INF", "+INF", "-INF", "INFINITY",
"+INFINITY", "-INFINITY", and capitalization variations of those, in
addition to a bunch of representations of NaN, so for maximum portability
you might argue we should make our s-expression parser handle all of those
even on non-C99 systems. On the other hand, s-expression parsing is only
used for builtin functions, and at the moment builtin functions only use
"+INF", so any code we write to support other forms won't actually be
exercised. Personally, I favor just doing "+INF" on the grounds that it is
the smallest fix that meets our present needs, and that adding anything
else would require extra testing effort to validate. Keeping the fix as
small as possible seems especially prudent considering that this fix is a
candidate for the 8.0 branch.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mesa-dev