Hi Ian, Hi Nick,

  Comping the GOLD linker with Clang has started producing this error
  message:

    In file included from gold/archive.cc:29:
    include/libiberty.h:646:25: error: 'register' storage class
      specifier is deprecated and incompatible with C++17
      [-Werror,-Wdeprecated-register]

  So I would like to apply the patch below to fix this.  Is this OK ?
  
Cheers
  Nick

include/ChangeLog
2020-06-25  Nick Clifton  <ni...@redhat.com>

        * libiberty.h (bsearch_r): Remove use of the register keyword from
        the prototype.

diff --git a/include/libiberty.h b/include/libiberty.h
index 0bb5b81d4a..591e9ac48d 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -643,9 +643,9 @@ extern int pwait (int, int *, int);
 
 /* Like bsearch, but takes and passes on an argument like qsort_r.  */
 
-extern void *bsearch_r (register const void *, const void *,
-                       size_t, register size_t,
-                       register int (*)(const void *, const void *, void *),
+extern void *bsearch_r (const void *, const void *,
+                       size_t, size_t,
+                       int (*)(const void *, const void *, void *),
                        void *);
 
 #if defined(HAVE_DECL_ASPRINTF) && !HAVE_DECL_ASPRINTF

 

Reply via email to