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.
This commit is contained in:
Andrew Cagney 2003-01-31 23:22:07 +00:00
parent 8731e58ec7
commit 8dbb1c6595
5 changed files with 12 additions and 12 deletions

View file

@ -1,5 +1,8 @@
2003-01-31 Andrew Cagney <ac131313@redhat.com> 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. * utils.c: Re-indent.
* config/djgpp/fnchange.lst: Delete nindy files. * config/djgpp/fnchange.lst: Delete nindy files.

View file

@ -781,7 +781,7 @@ array_mod: '[' ']'
func_mod: '(' ')' func_mod: '(' ')'
{ $$ = 0; } { $$ = 0; }
| '(' nonempty_typelist ')' | '(' nonempty_typelist ')'
{ free ((PTR)$2); $$ = 0; } { free ($2); $$ = 0; }
; ;
/* We used to try to recognize more pointer to member types here, but /* We used to try to recognize more pointer to member types here, but

View file

@ -564,7 +564,7 @@ direct_abs_decl: '(' abs_decl ')'
func_mod: '(' ')' func_mod: '(' ')'
{ $$ = 0; } { $$ = 0; }
| '(' nonempty_typelist ')' | '(' nonempty_typelist ')'
{ free ((PTR)$2); $$ = 0; } { free ($2); $$ = 0; }
; ;
typebase /* Implements (approximately): (type-qualifier)* type-specifier */ typebase /* Implements (approximately): (type-qualifier)* type-specifier */

View file

@ -842,7 +842,7 @@ array_mod: '[' ']'
func_mod: '(' ')' func_mod: '(' ')'
{ $$ = 0; } { $$ = 0; }
| '(' nonempty_typelist ')' | '(' nonempty_typelist ')'
{ free ((PTR)$2); $$ = 0; } { free ($2); $$ = 0; }
; ;
/* We used to try to recognize more pointer to member types here, but /* We used to try to recognize more pointer to member types here, but

View file

@ -66,10 +66,10 @@
#endif #endif
#ifdef NEED_DECLARATION_MALLOC #ifdef NEED_DECLARATION_MALLOC
extern PTR malloc (); extern PTR malloc (); /* OK: PTR */
#endif #endif
#ifdef NEED_DECLARATION_REALLOC #ifdef NEED_DECLARATION_REALLOC
extern PTR realloc (); extern PTR realloc (); /* OK: PTR */
#endif #endif
#ifdef NEED_DECLARATION_FREE #ifdef NEED_DECLARATION_FREE
extern void free (); extern void free ();
@ -955,9 +955,6 @@ request_quit (int signo)
#if !defined (USE_MMALLOC) #if !defined (USE_MMALLOC)
/* NOTE: These must use PTR so that their definition matches the
declaration found in "mmalloc.h". */
static void * static void *
mmalloc (void *md, size_t size) 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 /* NOTE: These are declared using PTR to ensure consistency with
"libiberty.h". xfree() is GDB local. */ "libiberty.h". xfree() is GDB local. */
PTR PTR /* OK: PTR */
xmalloc (size_t size) xmalloc (size_t size)
{ {
return xmmalloc (NULL, size); return xmmalloc (NULL, size);
} }
PTR PTR /* OK: PTR */
xrealloc (PTR ptr, size_t size) xrealloc (PTR ptr, size_t size) /* OK: PTR */
{ {
return xmrealloc (NULL, ptr, size); return xmrealloc (NULL, ptr, size);
} }
PTR PTR /* OK: PTR */
xcalloc (size_t number, size_t size) xcalloc (size_t number, size_t size)
{ {
return xmcalloc (NULL, number, size); return xmcalloc (NULL, number, size);