From cae8fa8120c70195f34a2456f18c4c848a2d3e0c Mon Sep 17 00:00:00 2001 From: obrien Date: Sat, 16 Oct 1999 06:09:09 +0000 Subject: Virgin import of the GCC 2.95.1 compilers --- contrib/gcc/genattr.c | 49 ++++++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 25 deletions(-) (limited to 'contrib/gcc/genattr.c') diff --git a/contrib/gcc/genattr.c b/contrib/gcc/genattr.c index c50e0fd4..55d6fb1 100644 --- a/contrib/gcc/genattr.c +++ b/contrib/gcc/genattr.c @@ -1,5 +1,5 @@ /* Generate attribute information (insn-attr.h) from machine description. - Copyright (C) 1991, 1994, 1996, 1998 Free Software Foundation, Inc. + Copyright (C) 1991, 1994, 1996, 1998, 1999 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) This file is part of GNU CC. @@ -21,11 +21,6 @@ Boston, MA 02111-1307, USA. */ #include "hconfig.h" -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #include "rtl.h" #include "obstack.h" @@ -36,9 +31,9 @@ struct obstack *rtl_obstack = &obstack; #define obstack_chunk_alloc xmalloc #define obstack_chunk_free free -char *xmalloc PROTO((unsigned)); -static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1; -void fancy_abort PROTO((void)); +void fatal PVPROTO ((const char *, ...)) + ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; +void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN; /* Define this so we can link with print-rtl.o to get debug_rtx function. */ char **insn_name_ptr = 0; @@ -203,40 +198,44 @@ write_units (num_units, multiplicity, simultaneity, printf ("#define INSN_QUEUE_SIZE %d\n", q_size); } -char * +PTR xmalloc (size) - unsigned size; + size_t size; { - register char *val = (char *) malloc (size); + register PTR val = (PTR) malloc (size); if (val == 0) fatal ("virtual memory exhausted"); return val; } -char * -xrealloc (ptr, size) - char *ptr; - unsigned size; +PTR +xrealloc (old, size) + PTR old; + size_t size; { - char * result = (char *) realloc (ptr, size); - if (!result) + register PTR ptr; + if (old) + ptr = (PTR) realloc (old, size); + else + ptr = (PTR) malloc (size); + if (!ptr) fatal ("virtual memory exhausted"); - return result; + return ptr; } -static void -fatal VPROTO ((char *format, ...)) +void +fatal VPROTO ((const char *format, ...)) { -#ifndef __STDC__ - char *format; +#ifndef ANSI_PROTOTYPES + const char *format; #endif va_list ap; VA_START (ap, format); -#ifndef __STDC__ - format = va_arg (ap, char *); +#ifndef ANSI_PROTOTYPES + format = va_arg (ap, const char *); #endif fprintf (stderr, "genattr: "); -- cgit v1.1