* gdb: remove use of PTR
@ 2022-05-12 5:19 Alan Modra
2022-05-12 14:54 ` Simon Marchi
0 siblings, 1 reply; 2+ messages in thread
From: Alan Modra @ 2022-05-12 5:19 UTC (permalink / raw)
To: gdb-patches
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: gdb: remove use of PTR
2022-05-12 5:19 gdb: remove use of PTR Alan Modra
@ 2022-05-12 14:54 ` Simon Marchi
0 siblings, 0 replies; 2+ messages in thread
From: Simon Marchi @ 2022-05-12 14:54 UTC (permalink / raw)
To: Alan Modra, gdb-patches
On 5/12/22 01:19, Alan Modra via Gdb-patches wrote:
> PTR will disappear from ansidecl.h and libiberty on the next import
> from gcc. Remove current uses in gdb. OK to apply?
Yes, thanks.
Simon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-12 14:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-12 5:19 gdb: remove use of PTR Alan Modra
2022-05-12 14:54 ` Simon Marchi
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).