From 4fa31c2aae72bba8150f3bacb3529d5eb4ed4866 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Tue, 23 Jul 2002 06:22:05 +0000 Subject: [PATCH] defaults.h (obstack_chunk_alloc, [...]): Default definition. * defaults.h (obstack_chunk_alloc, obstack_chunk_free): Default definition. * gcse.c: Don't define obstack_chunk_free. * collect2.c, conflict.c, df.c, diagnostic.c, fix-header.c, flow.c, gcc.c, genattrtab.c, genautomata.c, genflags.c, gensupport.c, integrate.c, loop.c, ra.c, read-rtl.c, regrename.c, reload1.c, reorg.c, tlink.c, tree.c, config/arm/arm.c, objc/objc-act.c: Don't define obstack macros. cp: * class.c, method.c, pt.c, search.c: Similarly. From-SVN: r55665 --- gcc/ChangeLog | 11 +++++++++++ gcc/collect2.c | 4 ---- gcc/config/arm/arm.c | 3 --- gcc/conflict.c | 4 ---- gcc/cp/ChangeLog | 4 ++++ gcc/cp/class.c | 2 -- gcc/cp/method.c | 3 --- gcc/cp/pt.c | 3 --- gcc/cp/search.c | 4 ---- gcc/defaults.h | 3 +++ gcc/df.c | 3 --- gcc/diagnostic.c | 3 --- gcc/fix-header.c | 2 -- gcc/flow.c | 3 --- gcc/gcc.c | 3 --- gcc/gcse.c | 4 +++- gcc/genattrtab.c | 3 --- gcc/genautomata.c | 3 --- gcc/genflags.c | 4 ---- gcc/gensupport.c | 3 --- gcc/integrate.c | 2 -- gcc/loop.c | 3 --- gcc/objc/objc-act.c | 3 --- gcc/ra.c | 3 --- gcc/read-rtl.c | 3 --- gcc/regrename.c | 3 --- gcc/reload1.c | 3 --- gcc/reorg.c | 3 --- gcc/tlink.c | 4 ---- gcc/tree.c | 2 -- 30 files changed, 21 insertions(+), 80 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5981a8f..94cc6a5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2002-07-23 Neil Booth + + * defaults.h (obstack_chunk_alloc, obstack_chunk_free): + Default definition. + * gcse.c: Don't define obstack_chunk_free. + * collect2.c, conflict.c, df.c, diagnostic.c, fix-header.c, + flow.c, gcc.c, genattrtab.c, genautomata.c, genflags.c, gensupport.c, + integrate.c, loop.c, ra.c, read-rtl.c, regrename.c, reload1.c, + reorg.c, tlink.c, tree.c, config/arm/arm.c, objc/objc-act.c: + Don't define obstack macros. + 2002-07-22 Stephane Carrez PR target/6744 diff --git a/gcc/collect2.c b/gcc/collect2.c index 7d90658..ea888e4 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -57,10 +57,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "obstack.h" #include "intl.h" #include "version.h" - -/* Obstack allocation and deallocation routines. */ -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free /* On certain systems, we have code that works by scanning the object file directly. But this code uses system-specific header files and library diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index cd75a6b..b4b747e 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -187,9 +187,6 @@ struct gcc_target targetm = TARGET_INITIALIZER; static struct obstack minipool_obstack; static char * minipool_startobj; -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free - /* The maximum number of insns skipped which will be conditionalised if possible. */ static int max_insns_skipped = 5; diff --git a/gcc/conflict.c b/gcc/conflict.c index e2c2841..9851fad 100644 --- a/gcc/conflict.c +++ b/gcc/conflict.c @@ -33,10 +33,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "hard-reg-set.h" #include "basic-block.h" -/* Use malloc to allocate obstack chunks. */ -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free - /* A register conflict graph is an undirected graph containing nodes for some or all of the regs used in a function. Arcs represent conflicts, i.e. two nodes are connected by an arc if there is a diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index fc54180..4a63bc6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2002-07-23 Neil Booth + + * class.c, method.c, pt.c, search.c: Don't define obstack macros. + 2002-07-22 Kriang Lerdsuwanakij PR c++/7347, c++/7348 diff --git a/gcc/cp/class.c b/gcc/cp/class.c index b59c7ce..d56be69 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -36,8 +36,6 @@ Boston, MA 02111-1307, USA. */ #include "target.h" #include "obstack.h" -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free /* The number of nested classes being processed. If we are not in the scope of any class, this is zero. */ diff --git a/gcc/cp/method.c b/gcc/cp/method.c index b74bd28..73cdd40 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -54,9 +54,6 @@ enum mangling_flags typedef enum mangling_flags mangling_flags; -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free - static void do_build_assign_ref PARAMS ((tree)); static void do_build_copy_constructor PARAMS ((tree)); static tree synthesize_exception_spec PARAMS ((tree, tree (*) (tree, void *), void *)); diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 52554a9..565b75f 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -73,9 +73,6 @@ static GTY(()) tree current_tinst_level; local variables. */ static htab_t local_specializations; -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free - #define UNIFY_ALLOW_NONE 0 #define UNIFY_ALLOW_MORE_CV_QUAL 1 #define UNIFY_ALLOW_LESS_CV_QUAL 2 diff --git a/gcc/cp/search.c b/gcc/cp/search.c index 95d5dde..692a0e3 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -33,10 +33,6 @@ Boston, MA 02111-1307, USA. */ #include "output.h" #include "ggc.h" #include "toplev.h" - -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free - #include "stack.h" /* Obstack used for remembering decision points of breadth-first. */ diff --git a/gcc/defaults.h b/gcc/defaults.h index b542e53..6d12e09 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -27,6 +27,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #define GET_ENVIRONMENT(VALUE, NAME) do { (VALUE) = getenv (NAME); } while (0) #endif +#define obstack_chunk_alloc xmalloc +#define obstack_chunk_free free + /* Define default standard character escape sequences. */ #ifndef TARGET_BELL # define TARGET_BELL 007 diff --git a/gcc/df.c b/gcc/df.c index 7b8b85e..1507780 100644 --- a/gcc/df.c +++ b/gcc/df.c @@ -189,9 +189,6 @@ do { \ EXECUTE_IF_SET_IN_SBITMAP (BITMAP, MIN, node_, \ {(BB) = BASIC_BLOCK (node_); CODE;});} while (0) -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free - static struct obstack df_ref_obstack; static struct df *ddf; diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index 120441f..89130cc 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -37,9 +37,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "langhooks.h" #include "langhooks-def.h" -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free - #define output_formatted_integer(BUFFER, FORMAT, INTEGER) \ do \ { \ diff --git a/gcc/fix-header.c b/gcc/fix-header.c index 0a3e98f..24c2070 100644 --- a/gcc/fix-header.c +++ b/gcc/fix-header.c @@ -372,8 +372,6 @@ int seen_errno = 0; /* The following are only used when handling stdlib.h */ int seen_EXIT_FAILURE = 0, seen_EXIT_SUCCESS = 0; -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free struct obstack scan_file_obstack; /* NOTE: If you edit this, also edit gen-protos.c !! */ diff --git a/gcc/flow.c b/gcc/flow.c index aad646a..3a7326a 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -140,9 +140,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "obstack.h" #include "splay-tree.h" -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free - /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, the stack pointer does not matter. The value is tested only in functions that have frame pointers. diff --git a/gcc/gcc.c b/gcc/gcc.c index 73ae198..9499c03 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -122,9 +122,6 @@ extern int getrusage PARAMS ((int, struct rusage *)); static const char dir_separator_str[] = { DIR_SEPARATOR, 0 }; -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free - /* Most every one is fine with LIBRARY_PATH. For some, it conflicts. */ #ifndef LIBRARY_PATH_ENV #define LIBRARY_PATH_ENV "LIBRARY_PATH" diff --git a/gcc/gcse.c b/gcc/gcse.c index 7fdcdea..37fa2d6 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -165,8 +165,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "cselib.h" #include "obstack.h" + +/* We don't want to use xmalloc. */ +#undef obstack_chunk_alloc #define obstack_chunk_alloc gmalloc -#define obstack_chunk_free free /* Propagate flow information through back edges and thus enable PRE's moving loop invariant calculations out of loops. diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index 71c5957..07b300c 100644 --- a/gcc/genattrtab.c +++ b/gcc/genattrtab.c @@ -121,9 +121,6 @@ static struct obstack obstack1, obstack2; struct obstack *hash_obstack = &obstack1; struct obstack *temp_obstack = &obstack2; -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free - /* enough space to reserve for printing out ints */ #define MAX_DIGITS (HOST_BITS_PER_INT * 3 / 10 + 3) diff --git a/gcc/genautomata.c b/gcc/genautomata.c index 0fddf27..a43b983 100644 --- a/gcc/genautomata.c +++ b/gcc/genautomata.c @@ -116,9 +116,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "genattrtab.h" -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free - /* Positions in machine description file. Now they are not used. But they could be used in the future for better diagnostic messages. */ typedef int pos_t; diff --git a/gcc/genflags.c b/gcc/genflags.c index 010ac70..114b98b 100644 --- a/gcc/genflags.c +++ b/gcc/genflags.c @@ -29,10 +29,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "errors.h" #include "gensupport.h" - -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free - /* Obstack to remember insns with. */ static struct obstack obstack; diff --git a/gcc/gensupport.c b/gcc/gensupport.c index 7cfa31b..9e3d0bb 100644 --- a/gcc/gensupport.c +++ b/gcc/gensupport.c @@ -32,9 +32,6 @@ int target_flags; static struct obstack obstack; struct obstack *rtl_obstack = &obstack; -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free - static int sequence_num; static int errors; diff --git a/gcc/integrate.c b/gcc/integrate.c index 49fd448..c7eb506 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -46,8 +46,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "langhooks.h" #include "obstack.h" -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free extern struct obstack *function_maybepermanent_obstack; diff --git a/gcc/loop.c b/gcc/loop.c index 1b8afd5..5959552 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -194,9 +194,6 @@ unsigned int max_reg_before_loop; /* The value to pass to the next call of reg_scan_update. */ static int loop_max_reg; - -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free /* During the analysis of a loop, a chain of `struct movable's is made to record all the movable insns found. diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index e339022..14bddd8 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -90,9 +90,6 @@ Boston, MA 02111-1307, USA. */ #include "obstack.h" -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free - /* This obstack is used to accumulate the encoding of a data type. */ static struct obstack util_obstack; /* This points to the beginning of obstack contents, diff --git a/gcc/ra.c b/gcc/ra.c index 34ac436..dbfce94 100644 --- a/gcc/ra.c +++ b/gcc/ra.c @@ -38,9 +38,6 @@ #include "flags.h" #include "ra.h" -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free - /* This is the toplevel file of a graph coloring register allocator. It is able to act like a George & Appel allocator, i.e. with iterative coalescing plus spill coalescing/propagation. diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c index 03b0f7d..8c378d9 100644 --- a/gcc/read-rtl.c +++ b/gcc/read-rtl.c @@ -25,9 +25,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "obstack.h" #include "hashtab.h" -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free - static htab_t md_constants; static void fatal_with_file_and_line PARAMS ((FILE *, const char *, ...)) diff --git a/gcc/regrename.c b/gcc/regrename.c index fafc4cf..6d7da30 100644 --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -36,9 +36,6 @@ #include "toplev.h" #include "obstack.h" -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free - #ifndef REGNO_MODE_OK_FOR_BASE_P #define REGNO_MODE_OK_FOR_BASE_P(REGNO, MODE) REGNO_OK_FOR_BASE_P (REGNO) #endif diff --git a/gcc/reload1.c b/gcc/reload1.c index 7212a56..0c23c24 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -280,9 +280,6 @@ char *reload_firstobj; Used to quickly free all memory after processing one insn. */ static char *reload_insn_firstobj; -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free - /* List of insn_chain instructions, one for every insn that reload needs to examine. */ struct insn_chain *reload_insn_chain; diff --git a/gcc/reorg.c b/gcc/reorg.c index 2ccde4f..f62e3ca 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -143,9 +143,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #ifdef DELAY_SLOTS -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free - #ifndef ANNUL_IFTRUE_SLOTS #define eligible_for_annul_true(INSN, SLOTS, TRIAL, FLAGS) 0 #endif diff --git a/gcc/tlink.c b/gcc/tlink.c index b2111dc..555deb6 100644 --- a/gcc/tlink.c +++ b/gcc/tlink.c @@ -31,10 +31,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #define MAX_ITERATIONS 17 -/* Obstack allocation and deallocation routines. */ -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free - /* Defined in the automatically-generated underscore.c. */ extern int prepends_underscore; diff --git a/gcc/tree.c b/gcc/tree.c index b307a94..1353f32 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -48,8 +48,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "target.h" #include "langhooks.h" -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free /* obstack.[ch] explicitly declined to prototype this. */ extern int _obstack_allocated_p PARAMS ((struct obstack *h, PTR obj)); -- 2.7.4