aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-01-31 23:22:07 +0000
committerAndrew Cagney <cagney@redhat.com>2003-01-31 23:22:07 +0000
commit8dbb1c6595ac7eab11c8d8d1706eba852adf4f56 (patch)
tree248190002e250667482afb7dc601a81b657b7834
parent8731e58ec78462405054a5229a108dc5fda8418a (diff)
downloadgdb-8dbb1c6595ac7eab11c8d8d1706eba852adf4f56.zip
gdb-8dbb1c6595ac7eab11c8d8d1706eba852adf4f56.tar.gz
gdb-8dbb1c6595ac7eab11c8d8d1706eba852adf4f56.tar.bz2
2003-01-31 Andrew Cagney <ac131313@redhat.com>
* objc-exp.y, c-exp.y, f-exp.y: Remove PTR casts. * utils.c: Update comments documenting legitimate uses of PTR.
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/c-exp.y2
-rw-r--r--gdb/f-exp.y2
-rw-r--r--gdb/objc-exp.y2
-rw-r--r--gdb/utils.c15
5 files changed, 12 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 78f6521..0f3fc6f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
2003-01-31 Andrew Cagney <ac131313@redhat.com>
+ * objc-exp.y, c-exp.y, f-exp.y: Remove PTR casts.
+ * utils.c: Update comments documenting legitimate uses of PTR.
+
* utils.c: Re-indent.
* config/djgpp/fnchange.lst: Delete nindy files.
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index 9df0aee..d47588e 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -781,7 +781,7 @@ array_mod: '[' ']'
func_mod: '(' ')'
{ $$ = 0; }
| '(' nonempty_typelist ')'
- { free ((PTR)$2); $$ = 0; }
+ { free ($2); $$ = 0; }
;
/* We used to try to recognize more pointer to member types here, but
diff --git a/gdb/f-exp.y b/gdb/f-exp.y
index 56fd70a..6966231 100644
--- a/gdb/f-exp.y
+++ b/gdb/f-exp.y
@@ -564,7 +564,7 @@ direct_abs_decl: '(' abs_decl ')'
func_mod: '(' ')'
{ $$ = 0; }
| '(' nonempty_typelist ')'
- { free ((PTR)$2); $$ = 0; }
+ { free ($2); $$ = 0; }
;
typebase /* Implements (approximately): (type-qualifier)* type-specifier */
diff --git a/gdb/objc-exp.y b/gdb/objc-exp.y
index 78f207d..1a7c5f0 100644
--- a/gdb/objc-exp.y
+++ b/gdb/objc-exp.y
@@ -842,7 +842,7 @@ array_mod: '[' ']'
func_mod: '(' ')'
{ $$ = 0; }
| '(' nonempty_typelist ')'
- { free ((PTR)$2); $$ = 0; }
+ { free ($2); $$ = 0; }
;
/* We used to try to recognize more pointer to member types here, but
diff --git a/gdb/utils.c b/gdb/utils.c
index 9b047bc..e7353bf 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -66,10 +66,10 @@
#endif
#ifdef NEED_DECLARATION_MALLOC
-extern PTR malloc ();
+extern PTR malloc (); /* OK: PTR */
#endif
#ifdef NEED_DECLARATION_REALLOC
-extern PTR realloc ();
+extern PTR realloc (); /* OK: PTR */
#endif
#ifdef NEED_DECLARATION_FREE
extern void free ();
@@ -955,9 +955,6 @@ request_quit (int signo)
#if !defined (USE_MMALLOC)
-/* NOTE: These must use PTR so that their definition matches the
- declaration found in "mmalloc.h". */
-
static void *
mmalloc (void *md, size_t size)
{
@@ -1150,19 +1147,19 @@ xmfree (void *md, void *ptr)
/* NOTE: These are declared using PTR to ensure consistency with
"libiberty.h". xfree() is GDB local. */
-PTR
+PTR /* OK: PTR */
xmalloc (size_t size)
{
return xmmalloc (NULL, size);
}
-PTR
-xrealloc (PTR ptr, size_t size)
+PTR /* OK: PTR */
+xrealloc (PTR ptr, size_t size) /* OK: PTR */
{
return xmrealloc (NULL, ptr, size);
}
-PTR
+PTR /* OK: PTR */
xcalloc (size_t number, size_t size)
{
return xmcalloc (NULL, number, size);