Fix the C++ version of issignaling when __NO_LONG_DOUBLE_MATH is defined
Commit Message
On Wed, 23 Aug 2017 00:41:23 +0000
Joseph Myers <joseph@codesourcery.com> wrote:
>This patch breaks building tests for long double = double configurations.
>__issignalingl does not exist in that case; the long double version of
>issignaling has to call __issignaling if __NO_LONG_DOUBLE_MATH is defined.
The following patch should fix this, however I do not have access to a
system where __NO_LONG_DOUBLE_MATH is defined. I'm building this with
build-many-glibcs.py, but that will take some time.
OK for master?
-- 8< --
When __NO_LONG_DOUBLE_MATH is defined, __issignalingl is not available,
thus issignaling with long double argument should call __issignaling,
instead.
Tested for powerpc64le.
* math/math.h [defined __cplusplus] (issignaling): In the long
double case, call __issignalingl only if __NO_LONG_DOUBLE_MATH
is not defined. Call __issignaling, otherwise.
---
math/math.h | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
Comments
On Wed, 23 Aug 2017, Gabriel F. T. Gomes wrote:
> On Wed, 23 Aug 2017 00:41:23 +0000
> Joseph Myers <joseph@codesourcery.com> wrote:
>
> >This patch breaks building tests for long double = double configurations.
> >__issignalingl does not exist in that case; the long double version of
> >issignaling has to call __issignaling if __NO_LONG_DOUBLE_MATH is defined.
>
> The following patch should fix this, however I do not have access to a
> system where __NO_LONG_DOUBLE_MATH is defined. I'm building this with
> build-many-glibcs.py, but that will take some time.
>
> OK for master?
OK.
On Thu, 24 Aug 2017 12:16:40 +0000
Joseph Myers <joseph@codesourcery.com> wrote:
>On Wed, 23 Aug 2017, Gabriel F. T. Gomes wrote:
>
>> The following patch should fix this, however I do not have access to a
>> system where __NO_LONG_DOUBLE_MATH is defined. I'm building this with
>> build-many-glibcs.py, but that will take some time.
>>
>> OK for master?
>
>OK.
Thanks. Pushed as 3d7b66f66cb2.
Running this with build-many-glibcs.py fixed the problem for the
mipsel-linux-gnu-soft configuration (which failed without the patch).
The other configurations are still running. If other errors show up, I'll
come back to this.
@@ -486,7 +486,15 @@ enum
extern "C++" {
inline int issignaling (float __val) { return __issignalingf (__val); }
inline int issignaling (double __val) { return __issignaling (__val); }
-inline int issignaling (long double __val) { return __issignalingl (__val); }
+inline int
+issignaling (long double __val)
+{
+# ifdef __NO_LONG_DOUBLE_MATH
+ return __issignaling (__val);
+# else
+ return __issignalingl (__val);
+# endif
+}
# if __HAVE_DISTINCT_FLOAT128
inline int issignaling (_Float128 __val) { return __issignalingf128 (__val); }
# endif