public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: gdb-patches@sourceware.org
Subject: gdb: remove use of PTR
Date: Thu, 12 May 2022 14:49:23 +0930	[thread overview]
Message-ID: <YnyY20hh0q2IyxIi@squeak.grove.modra.org> (raw)

PTR will disappear from ansidecl.h and libiberty on the next import
from gcc.  Remove current uses in gdb.  OK to apply?

diff --git a/gdb/alloc.c b/gdb/alloc.c
index 60098c7b0c8..c6234e985be 100644
--- a/gdb/alloc.c
+++ b/gdb/alloc.c
@@ -44,10 +44,7 @@
    consistent semantics and guard against typical memory management
    problems.  */
 
-/* NOTE: These are declared using PTR to ensure consistency with
-   "libiberty.h".  xfree() is GDB local.  */
-
-PTR                            /* ARI: PTR */
+void *
 xmalloc (size_t size)
 {
   void *val;
@@ -64,8 +61,8 @@ xmalloc (size_t size)
   return val;
 }
 
-PTR                              /* ARI: PTR */
-xrealloc (PTR ptr, size_t size)          /* ARI: PTR */
+void *
+xrealloc (void *ptr, size_t size)
 {
   void *val;
 
@@ -84,7 +81,7 @@ xrealloc (PTR ptr, size_t size)          /* ARI: PTR */
   return val;
 }
 
-PTR                            /* ARI: PTR */
+void *
 xcalloc (size_t number, size_t size)
 {
   void *mem;

-- 
Alan Modra
Australia Development Lab, IBM

             reply	other threads:[~2022-05-12  5:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12  5:19 Alan Modra [this message]
2022-05-12 14:54 ` Simon Marchi

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=YnyY20hh0q2IyxIi@squeak.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=gdb-patches@sourceware.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: link
Be 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).