Comments

Hi, Joseph,
On Thu, 05 Sep 2019, Joseph Myers wrote:
>I think it should use __attribute_pure__, yes (although quite likely using >the older compilers for which they differ would show up other problems >with current glibc headers).
I committed the follow-up patch below with this fix. As I mentioned in
the commit message, all other occurrences of attribute *pure* in glibc use
the macro.
This is not true for the occurrences of attribute *const* in glibc, which
happen both with and without the macro, but based on your comment between
parentheses above, I suppose it doesn't matter that much (let me know if
I'm wrong, then I can write a similar cleanup (around 60 lines changes)).
Thanks,
Gabriel
From 1b7f04070bd94f259e2ed24d6fb76309d64fb164 Mon Sep 17 00:00:00 2001
From: "Gabriel F. T. Gomes" <gabrielftg@linux.ibm.com>
Date: Thu, 5 Sep 2019 17:06:03 -0300
Subject: [PATCH] Use __attribute_pure__ macro in bits/mathcalls.h
When the const attribute of totalorder* functions was replaced with the
pure attribute, by commit ID ab41100bab12, it did not use the
__attribute_pure__ macro, but the __attribute__ ((__pure__)) statement.
All other uses of the pure attribute in glibc use the macro.
Tested for powerpc64le.
---
math/bits/mathcalls.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)