[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-sparse
Subject: Re: [PATCH v2] add __builtin functions for isinf_sign, isfinite and isnan
From: Logan Gunthorpe <logang () deltatee ! com>
Date: 2017-11-17 23:39:37
Message-ID: b16d895e-d4fa-3590-4f0d-b9c0e8a754d3 () deltatee ! com
[Download RAW message or body]
On 17/11/17 04:28 PM, Luc Van Oostenryck wrote:
> Hmmm, looking at this closer, I only notice now that those builtins
> are of the type-generic kind. Declaring them with a prototype as if
> taking a float won't play nicely once you use them with a double or
> a long double. Alas, there is not yet real support for type-generic
> builtins. One solution would be:
> extern int __builtin_isfinite(long double);
> Another one would be to use:
> extern int __builtin_isfinite(...);
> but that is not C99 compliant (not sure if sparse complain).
This is true, but when I test with the validation suite sparse does not
seem to complain if it's a long double, double or float. So I don't
really see an actual issue.
> Note, that there is also a few more builtins of the same family.
Yes, though GCC's documentation is less than clear on all that are
available... I only added ones I knew to exist based on the code I'm
working on and examining the system headers.
Logan
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic