* lib/hash.c (compute_bucket_size): Change _GL_ATTRIBUTE_PURE
to _GL_ATTRIBUTE_CONST as suggested by GCC 13 with -flto.
---
 ChangeLog  | 6 ++++++
 lib/hash.c | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 5e93f9ac31..a57cc4ae59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-05-19  Pádraig Brady  <p...@draigbrady.com>
+
+       hash: pacify gcc -Wsuggest-attribute=const
+       * lib/hash.c (compute_bucket_size): Change _GL_ATTRIBUTE_PURE
+       to _GL_ATTRIBUTE_CONST as suggested by GCC 13 with -flto.
+
 2023-05-19  Pádraig Brady  <p...@draigbrady.com>
 
        modechange: pacify gcc -Wsuggest-attribute=pure
diff --git a/lib/hash.c b/lib/hash.c
index 918aa0d1c3..332cca6df9 100644
--- a/lib/hash.c
+++ b/lib/hash.c
@@ -492,7 +492,7 @@ check_tuning (Hash_table *table)
    TUNING, or return 0 if there is no possible way to allocate that
    many entries.  */
 
-static size_t _GL_ATTRIBUTE_PURE
+static size_t _GL_ATTRIBUTE_CONST
 compute_bucket_size (size_t candidate, const Hash_tuning *tuning)
 {
   if (!tuning->is_n_buckets)
-- 
2.40.1


Reply via email to