public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: John Ravi <jjravi@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/lto-offload] This patch removes the use of the "register" keyword from the bsearch() and bsearch_r() functions su Date: Sun, 28 Jun 2020 00:22:02 +0000 (GMT) [thread overview] Message-ID: <20200628002202.A0C933851C0A@sourceware.org> (raw) https://gcc.gnu.org/g:87fce92c5c3660a08172a9e29faf54573cedd9ae commit 87fce92c5c3660a08172a9e29faf54573cedd9ae Author: Nick Clifton <nickc@redhat.com> Date: Fri Jun 26 10:04:41 2020 +0100 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. Diff: --- include/libiberty.h | 6 +++--- libiberty/bsearch.c | 12 ++++++------ libiberty/bsearch_r.c | 12 ++++++------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/include/libiberty.h b/include/libiberty.h index 0bb5b81d4ac..591e9ac48d4 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 diff --git a/libiberty/bsearch.c b/libiberty/bsearch.c index 35fad19977c..18158b9591b 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 79ebae9b0be..2a2ca6f5e23 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;
reply other threads:[~2020-06-28 0:22 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200628002202.A0C933851C0A@sourceware.org \ --to=jjravi@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).