RFA: Remove use of register keyword in libiberty.h

Message ID 87d05nzbto.fsf@redhat.com
State New
Headers show
Series
  • RFA: Remove use of register keyword in libiberty.h
Related show

Commit Message

Jose E. Marchesi via Gcc-patches June 25, 2020, 10:20 a.m.
Hi Ian, Hi Nick,

  Compiling 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  <nickc@redhat.com>

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

Patch

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