aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2020-06-26 10:04:41 +0100
committerNick Clifton <nickc@redhat.com>2020-06-26 10:06:48 +0100
commit87fce92c5c3660a08172a9e29faf54573cedd9ae (patch)
tree068e19655a84ef679c80d328794c1bea54734bab /libiberty
parentd61ffe124430160c4da7516596d6a4dbcdf2a7a6 (diff)
downloadgcc-87fce92c5c3660a08172a9e29faf54573cedd9ae.zip
gcc-87fce92c5c3660a08172a9e29faf54573cedd9ae.tar.gz
gcc-87fce92c5c3660a08172a9e29faf54573cedd9ae.tar.bz2
This patch removes the use of the "register" keyword from the bsearch() and bsearch_r() functions supplied by libiberty. The register keyword is deprecated in C++17.
2020-06-25 Nick Clifton <nickc@redhat.com> include/ * libiberty.h (bsearch_r): Remove use of the register keyword from the prototype. libiberty/ * bsearch.c (bsearch): Remove use of register keyword. * bsearch_r.c (bsearch_r): Likewise.
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/bsearch.c12
-rw-r--r--libiberty/bsearch_r.c12
2 files changed, 12 insertions, 12 deletions
diff --git a/libiberty/bsearch.c b/libiberty/bsearch.c
index 35fad19..18158b9 100644
--- a/libiberty/bsearch.c
+++ b/libiberty/bsearch.c
@@ -69,13 +69,13 @@ is respectively less than, matching, or greater than the array member.
* look at item 3.
*/
void *
-bsearch (register const void *key, const void *base0,
- size_t nmemb, register size_t size,
- register int (*compar)(const void *, const void *))
+bsearch (const void *key, const void *base0,
+ size_t nmemb, size_t size,
+ int (*compar)(const void *, const void *))
{
- register const char *base = (const char *) base0;
- register int lim, cmp;
- register const void *p;
+ const char *base = (const char *) base0;
+ int lim, cmp;
+ const void *p;
for (lim = nmemb; lim != 0; lim >>= 1) {
p = base + (lim >> 1) * size;
diff --git a/libiberty/bsearch_r.c b/libiberty/bsearch_r.c
index 79ebae9..2a2ca6f 100644
--- a/libiberty/bsearch_r.c
+++ b/libiberty/bsearch_r.c
@@ -70,14 +70,14 @@ is respectively less than, matching, or greater than the array member.
* look at item 3.
*/
void *
-bsearch_r (register const void *key, const void *base0,
- size_t nmemb, register size_t size,
- register int (*compar)(const void *, const void *, void *),
+bsearch_r (const void *key, const void *base0,
+ size_t nmemb, size_t size,
+ int (*compar)(const void *, const void *, void *),
void *arg)
{
- register const char *base = (const char *) base0;
- register int lim, cmp;
- register const void *p;
+ const char *base = (const char *) base0;
+ int lim, cmp;
+ const void *p;
for (lim = nmemb; lim != 0; lim >>= 1) {
p = base + (lim >> 1) * size;