Mark Mitchell
a8f73d4b36
Reorganize per-function data.
...
* cp-tree.h (saved_scope): Add function_decl, bindings.
(language_function): Rename binding_level to bindings.
(cp_function_chain): Use the current_function, not the
outer_function_chain.
(current_class_ptr): Make it work, even when there's no
current function.
(current_class_ref): Likewise.
(SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
macros.
(clear_temp_name): Remove.
* decl.c (check_function_type): New function, broken out from
start_function.
(current_binding_level): Adjust definition.
(pushlevel): Simplify.
(poplevel): Don't use named_label_uses when we're outside
a function scope.
(mark_saved_scope): Mark function_decl and bindings.
(maybe_push_to_top_level): Don't unconditionally push a new
function context. Save bindings and the current_function_decl.
Don't clear named_labels.
(pop_from_top_level): Pop function context if appropriate.
(init_decl_processing): Set init_lang_status and free_lang_status,
rather than save_lang_status and restore_lang_status.
(start_function): Take SF_* flags. Don't clear per-function data.
Reorder and simplify to use new per-function data code. Add
asserts.
(store_parm_decls): Don't call init_function_start here.
(finish_function): Adjust for new handling of per-function data.
(push_cp_function_context): Simplify.
(mark_cp_function_context): Change binding_level to bindings.
* decl2.c (clear_temp_name): Remove.
(start_objects): Use SF flags to start_function.
(start_static_storage_duration_function): Likewise.
* except.c (start_anon_func): Remove redundant calls to
push_function_context_to. Use SF flags to start function.
(end_anon_func): Remove redundant call to pop_function_context
from.
* lex.c (reinit_parse_for_function): Don't initialize per-function
data.
* method.c (emit_thunk): Clear current_function after calling
assemble_end_function. Use SF flags for start_function.
(synthesize_method): Use SF flags for start_function.
* parse.c: Regenerated.
* parse.y (fn.defpen): Likewise.
(pending_inline): Clear current_function, even if something goes
wrong.
* pt.c (instantiate_decl): Use SF flags to start_function.
Don't save and restore expanding_p.
(add_tree): Handle the case where we are outside any function.
(end_tree): Likewise.
* rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
* semantics.c (begin_function_definition): Likewise.
(expand_body): Likewise.
From-SVN: r29240
1999-09-09 19:02:39 +00:00
Mark Mitchell
0a8a198ceb
function.h (free_after_compilation): Remove decl parameter.
...
* function.h (free_after_compilation): Remove decl parameter.
(free_varasm_status0: Likewise.
(free_emit_status): Likewise.
(free_stmt_status): Likewise.
(free_after_compilation): Likewise.
(init_lang_status): New variable.
(free_lang_status): Likewise.
* emit-rtl.c (free_emit_status): Make decl parameter implicit.
* function.c (init_lang_status): New variable.
(free_lang_status): Likewise.
(push_function_context_to): Don't set function::decl here.
(free_after_copmilation): Make decl parameter implicit. Call
free_lang_status if defined.
(prepare_function_start): Call init_lang_status if defined.
(init_function_start): Set function::decl here.
* profile.c (output_func_start_profiler): Don't call pushdecl
until we've actually started the function.
* stmt.c (free_stmt_status): Make decl parameter implicit.
* toplev.c (rest_of_compilation): Don't pass decl to
free_after_compilation.
* varasm.c (free_varasm_status): Likewise.
From-SVN: r29239
1999-09-09 18:55:37 +00:00
Mark Mitchell
1814b96be2
cp-tree.h (scratch_tree_cons): Remove.
...
* cp-tree.h (scratch_tree_cons): Remove.
* call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
and perm_tree_cons with plain tree_cons.
* class.c: Likewise.
* decl.c: Likewise.
* decl2.c: Likewise.
* except.c: Likewise.
* expr.c: Likewise.
* init.c: Likewise.
* lex.c: Likewise.
* method.c: Likewise.
* parse.y: Likewise.
* pt.c: Likewise.
* repo.c: Likewise.
* rtti.c: Likewise.
* search.c: Likewise.
* typeck.c: Likewise.
* parse.c: Regenerated.
* tree.c (build_srcloc): Simplify.
From-SVN: r29238
1999-09-09 18:33:45 +00:00
Richard Henderson
cdf508e83b
* g++.old-deja/g++.other/delete6.C: Use size_t with operator new.
...
From-SVN: r29237
1999-09-09 10:41:45 -07:00
Bernd Schmidt
638e6ebc27
Add a missing GC root
...
From-SVN: r29236
1999-09-09 16:24:08 +00:00
Richard Earnshaw
92a432f4dd
arm.c: Include "ggc.h".
...
* arm.c: Include "ggc.h".
(arm_add_gc_roots): New function.
(arm_override_options): Call it.
(aof_pic_entry): Add a GC root for aof_pic_label when it's allocated.
* arm.md (define_asm_attributes): Add a pool_range attribute.
From-SVN: r29235
1999-09-09 14:30:54 +00:00
Nathan Sidwell
6e9d618910
lookup11.C: New test.
...
* g++.old-deja/g++.other/lookup11.C: New test.
* g++.old-deja/g++.bugs/900428_01.C: Rework now we understand
what is permitted and what we want.
* g++.old-deja/g++.jason/rfg4.C: Rework to remove ill-formed
overload use.
* g++.old-deja/g++.jason/rfg5.C: Likewise
From-SVN: r29234
1999-09-09 12:11:22 +00:00
Nathan Sidwell
02cac427d5
extend.texi (Volatiles): New node.
...
gcc/ChangeLog:
* extend.texi (Volatiles): New node.
gcc/cp/ChangeLog:
* cp-tree.h (convert_to_void): Prototype new function.
(require_complete_type_in_void): Remove prototype.
* cvt.c (convert_to_void): New function.
(ocp_convert): Use convert_to_void.
* decl.c (cplus_expand_expr_stmt): Likewise, for complete
expressions.
* typeck.c (require_complete_type_in_void): Remove function.
(build_compound_expr): Use convert_to_void.
(build_static_cast): Likewise.
(build_c_cast): Likewise.
* semantics.c (finish_expr_stmt): Do not decay full expressions.
* typeck.c (build_x_compound_expr): Add FIXME.
From-SVN: r29233
1999-09-09 12:07:46 +00:00
Nick Clifton
fb3f91c9a8
Pass -pedantic command line switch on to cpplib
...
From-SVN: r29232
1999-09-09 11:22:50 +00:00
Richard Henderson
9b1b9cc910
ggc-simple.c (IS_MARKED, [...]): New.
...
* ggc-simple.c (IS_MARKED, IGNORE_MARK): New.
(GGC_ANY_MAGIC, GGC_ANY_MAGIC_MARK): New.
(struct ggc_any): Replace `mark' with `magic_mark'.
(ggc_alloc_string): Use memcpy, not bcopy.
(ggc_alloc_any): Set magic_mark. Update bytes_alloced_since_gc.
(ggc_free_{rtx,rtvec,tree,string}): Mark inline.
(ggc_free_any): New.
(ggc_mark_string): Use IGNORE_MARK. Calc back to struct gcc_string.
(ggc_mark): Use IGNORE_MARK. Abort if magic doesn't match.
(ggc_collect): Re-enable collection avoidance. Use GGC_ANY_MARK.
Use IS_MARKED. Use ggc_free_any.
From-SVN: r29231
1999-09-09 03:43:57 -07:00
Scott Bambrough
7bfcb18070
define NO_IMPLICIT_EXTERN_C
...
From-SVN: r29230
1999-09-09 09:12:03 +00:00
Richard Henderson
d09b562cb1
* toplev.c (main): Always init_ggc.
...
From-SVN: r29229
1999-09-09 01:56:16 -07:00
Jeff Law
94d84bab3e
Daily bump.
...
From-SVN: r29228
1999-09-09 01:45:13 -06:00
Richard Henderson
a9f0664a5a
except.c (find_all_handler_type_matches): Free the list if we found no matches.
...
* except.c (find_all_handler_type_matches): Free the list if
we found no matches.
From-SVN: r29227
1999-09-09 00:17:20 -07:00
Richard Henderson
76095e2f54
combine.c (SUBST): Break out to a real function do_SUBST.
...
* combine.c (SUBST): Break out to a real function do_SUBST.
(SUBST_INT): Likewise.
* gcse.c (free_pre_mem): Free `temp_bitmap'.
(pre_insert): Free `inserted'.
* loop.c (basic_induction_var): Always set `location'.
* function.c (expand_function_end): Add initial_trampoline as a root.
* rtl.h (init_varasm_once): Declare.
* toplev.c (compile_file): Call it.
* ggc-simple.c (ggc_mark_string_ptr): New.
(ggc_add_string_root): New.
(ggc_collect): Disable collection avoidance temporarily.
* ggc.h (ggc_add_string_root): Declare.
* except.c (create_rethrow_ref): Use ggc_alloc_string.
* optabs.c (init_libfuncs): Likewise.
* varasm.c (named_section): Use ggc_alloc_string.
(make_function_rtl): Likewise.
(make_decl_rtl): Likewise.
(assemble_static_space): Likewise.
(assemble_trampoline_template): Likewise.
(output_constant_def): Likewise.
(force_const_mem): Likewise.
(mark_const_hash_entry): New.
(mark_pool_sym_hash_table): New.
(mark_varasm_state): Use it.
(init_varasm_once): New.
* expr.h (init_one_libfunc): Declare.
* optabs.c (init_one_libfunc): New.
(init_optabs): Use it.
* config/gofast.h: Likewise.
* config/sparc/sol2.h (INIT_SUBTARGET_OPTABS): Likewise.
* config/sparc/sparc.h (INIT_TARGET_OPTABS): Likewise.
From-SVN: r29226
1999-09-09 00:07:41 -07:00
Mark Mitchell
e1b3e07d15
cp-tree.h (scratch_tree_cons): Remove.
...
* cp-tree.h (scratch_tree_cons): Remove.
* call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
and perm_tree_cons with plain tree_cons.
* class.c: Likewise.
* decl.c: Likewise.
* decl2.c: Likewise.
* except.c: Likewise.
* expr.c: Likewise.
* init.c: Likewise.
* lex.c: Likewise.
* method.c: Likewise.
* parse.y: Likewise.
* pt.c: Likewise.
* repo.c: Likewise.
* rtti.c: Likewise.
* search.c: Likewise.
* typeck.c: Likewise.
* parse.c: Regenerated.
* tree.c (build_srcloc): Simplify.
From-SVN: r29225
1999-09-09 06:17:13 +00:00
Geoff Keating
fc009f966c
Makefile.in (cppexp.o): Depend on cpphash.h.
...
* Makefile.in (cppexp.o): Depend on cpphash.h.
* cppexp.c (cpp_lex): Handle `defined (xxx)' for poisoned xxx.
Include cpphash.h.
* cpphash.c (special_symbol): Handle plain `xxx' for poisoned xxx.
* cpplib.c (do_define): Generalise to handle poisoned definitions,
redefining poisoned identifiers, etc.
(do_undef): Don't allow poisoned identifiers to be undefined.
(do_pragma): Add #pragma poison.
(do_xifdef): Handle `#ifdef xxx' for poisoned xxx.
* cccp.c: Add T_POISON node type.
(special_symbol): Handle `defined(xxx)' and plain `xxx' for
poisoned xxx.
(do_define): Generalise to handle poisoned definitions,
redefining poisoned identifiers, etc.
(do_undef): Don't allow poisoned identifiers to be undefined.
(do_pragma): Add #pragma poison.
(do_xifdef): Handle `#ifdef xxx' for poisoned xxx.
* c-pragma.c (handle_pragma_token): Ignore #pragma poison.
* c-pragma.h: Add ps_poison state. We now always have generic
pragmas.
From-SVN: r29224
1999-09-09 04:00:37 +00:00
Mark Mitchell
d60f72aec5
cp-tree.h (lang_decl_flags): Remove permanent_attr.
...
* cp-tree.h (lang_decl_flags): Remove permanent_attr.
Remove next.
(LANG_DECL_PERMANENT): Remove.
* decl.c (duplicate_decls): Don't mess about with obstacks trying
to free memory.
(lang_mark_tree): Mark DECL_LANG_SPECIFIC.
* lex.c (free_lang_decl_chain): Remove.
(build_lang_decl): Don't use obstacks.
(retrofit_lang_decl): Likewise.
(copy_lang_decl): Likewise.
From-SVN: r29223
1999-09-09 03:31:23 +00:00
Mark Mitchell
37b31aefeb
ggc.h (ggc_alloc): New function.
...
* ggc.h (ggc_alloc): New function.
(ggc_mark): Likewise.
* ggc-simple.c (ggc_any): New structure.
(ggc_status): Add anys.
(n_anys_collected): New variable.
(ggc_alloc): Define.
(ggc_mark): Likewise.
(ggc_collect): Collect the anys.
From-SVN: r29222
1999-09-09 03:26:58 +00:00
Mark Mitchell
fc0e7bf5d1
cp-tree.h (saved_scope): Remove old_binding_level and function_decl.
...
* cp-tree.h (saved_scope): Remove old_binding_level and
function_decl. Tidy up.
* decl.c (mark_saved_scope): Don't set them.
(maybe_push_to_top_level): Clear memory.
From-SVN: r29221
1999-09-09 01:47:02 +00:00
Mark Mitchell
c82dbd9588
decl.c (layout_var_decl): Change prototype.
...
* decl.c (layout_var_decl): Change prototype. Don't complete
types for external objects.
(check_initializer): Likewise. Tidy.
(initialize_local_var): Complete types here.
(cp_finish_decl): Not here. Reorganize a little.
(grokvardecl): Don't complete types here.
From-SVN: r29220
1999-09-09 00:29:22 +00:00
Kaveh R. Ghazi
dbec3d5b8f
* c-decl.c (mark_binding_level): Make static to match prototype.
...
From-SVN: r29219
1999-09-09 00:22:07 +00:00
Kaveh R. Ghazi
33c5ddcd3e
* xmemdup.c: Include sys/types.h.
...
From-SVN: r29218
1999-09-09 00:11:39 +00:00
Richard Henderson
9831d64062
* flow.c (new_insn_dead_notes): Don't early out for preexisting regs.
...
From-SVN: r29217
1999-09-08 16:42:18 -07:00
Richard Henderson
b6b4c6c6f9
gengenrtl.c (CONST_DOUBLE_FORMAT): Take the size REAL_ARITHMETIC will use into account.
...
* gengenrtl.c (CONST_DOUBLE_FORMAT): Take the size REAL_ARITHMETIC
will use into account. Expand the max width to 5.
* rtl.c: Likewise.
From-SVN: r29216
1999-09-08 16:09:38 -07:00
Richard Henderson
38792a9487
ggc-simple.c (ggc_free_rtx): Poison the correct amount for the rtx length.
...
* ggc-simple.c (ggc_free_rtx): Poison the correct amount
for the rtx length.
From-SVN: r29215
1999-09-08 16:02:12 -07:00
Richard Henderson
3d46d5af21
* alpha.md (call value patterns): Remove the result predicates.
...
From-SVN: r29214
1999-09-08 15:24:45 -07:00
Mark Mitchell
be91309cda
decl.c (start_function): Clear last_dtor_insn and last_parm_cleanup_insn.
...
* decl.c (start_function): Clear last_dtor_insn and
last_parm_cleanup_insn.
(push_cp_function_context): Just copy over a little of
the old context, not all of it.
From-SVN: r29213
1999-09-08 20:53:47 +00:00
Richard Henderson
2e769ad05c
Makefile.in (stmp-fixinc): Remove extraneous exit 1 from last change.
...
* Makefile.in (stmp-fixinc): Remove extraneous exit 1 from
last change.
From-SVN: r29212
1999-09-08 13:37:56 -07:00
Mark Mitchell
2a1e9fdd03
cp-tree.h (copy_to_permanent): Remove.
...
* cp-tree.h (copy_to_permanent): Remove.
(permanent_p): Likewise.
* decl.c (building_typename_type): Don't use copy_to_permanent.
(start_decl): Likewise.
(grok_reference_init): Likewise.
(cp_finish_decl): Likewise.
* init.c (build_new_1): Don't use mapcar.
(build_vec_delete_1): Don't use copy_to_permanent.
(build_vec_init): Likewise.
* parse.y (primary): Likewise.
* parse.c: Regenerated.
* pt.c (push_template_decl_real): Don't use copy_to_permanent.
(lookup_template_class): Likewise.
(tsubst_friend_function): Likewise.
(instantiate_class_template): Likewise.
(tsubst_decl): Likewise.
(tsubst): Likewise.
(instantiate_template): Likewise.
(unify): Likewise.
* rtti.c (get_tinfo_fn): Likewise.
(build_dynamic_cast): Likewise.
* semantics.c (finish_if_stmt_cond): Likewise.
(finish_while_stmt_cond): Likewise.
(finish_do_stmt): Likewise.
(finish_for_cond): Likewise.
(finish_for_expr): Likewise.
(finish_cleanup): Likewise.
(add_decl_stmt): Likewise.
(finish_named_return_value): Likewise.
(finish_qualified_call_expr): Likewise.
* tree.c (perm_manip): Remove.
(build_exception_variant): Don't use copy_to_permanent.
(permanent_p): Remove.
(copy_to_permament): Remove.
(build_min_nt): Don't use copy_to_permanent.
(build_min): Likewise.
(min_tree_cons): Likewise.
* typeckc.c (build_static_cast): Likewise.
(build_reinterpret_cast): Likewise.
(build_const_cast): Likewise.
From-SVN: r29211
1999-09-08 20:12:35 +00:00
Kaveh R. Ghazi
ce3700e3ba
system.h (sbrk, [...]): Backup prototypes changed from extern char *, to extern PTR.
...
* system.h (sbrk, malloc, calloc, realloc): Backup prototypes
changed from extern char *, to extern PTR. Also fix typo in
NEED_DECLARATION_REALLOC test.
* mips-tdump.c (malloc, calloc, realloc): Don't prototype.
From-SVN: r29210
1999-09-08 19:42:01 +00:00
Tom Tromey
c45a8466e6
posix-threads.h (_Jv_PthreadCheckMonitor): Reverted previous change and implemented a correct test in the __m_count case.
...
* include/posix-threads.h (_Jv_PthreadCheckMonitor): Reverted
previous change and implemented a correct test in the __m_count
case.
From-SVN: r29209
1999-09-08 17:10:22 +00:00
Kaveh R. Ghazi
e1b6684cec
gansidecl.h (__attribute__, [...]): Delete.
...
* gansidecl.h (__attribute__, ATTRIBUTE_UNUSED_LABEL,
ATTRIBUTE_UNUSED, ATTRIBUTE_NORETURN, ATTRIBUTE_PRINTF,
ATTRIBUTE_PRINTF_1, ATTRIBUTE_PRINTF_2, ATTRIBUTE_PRINTF_3,
ATTRIBUTE_PRINTF_4, ATTRIBUTE_PRINTF_5, GENERIC_PTR): Delete.
* c-decl.c (field_decl_cmp): Use PTR instead of GENERIC_PTR.
* cccp.c (pcfinclude): Likewise.
* global.c (allocno_compare): Likewise.
* haifa-sched.c (rank_for_schedule): Likewise.
* local-alloc.c (qty_sugg_compare_1, qty_compare_1): Likewise.
* reload1.c (hard_reg_use_compare, reload_reg_class_lower): Likewise.
* stupid.c (stupid_reg_compare): Likewise.
* tree.c (_obstack_allocated_p): Likewise.
* varray.h (varray_data_tag, VARRAY_GENERIC_PTR_INIT): Likewise.
From-SVN: r29208
1999-09-08 15:44:18 +00:00
Bruce Korb
98cc505096
Hapless User Hint for gperf
...
From-SVN: r29207
1999-09-08 14:08:26 +00:00
Richard Henderson
d2cdcacaf2
ggc-simple.c (init_ggc): Absorb the old init.
...
* ggc-simple.c (init_ggc): Absorb the old init.
(ggc_push_context): Use xcalloc.
(ggc_alloc_rtx, ggc_alloc_rtvec, ggc_alloc_tree): Likewise.
(ggc_collect): Add [rvts] tags to the collection stats.
From-SVN: r29206
1999-09-08 04:59:52 -07:00
Richard Henderson
7cf3d8b413
lists.c: Include ggc.h.
...
* lists.c: Include ggc.h.
(zap_lists): New.
(init_EXPR_INSN_LIST_cache): Install it.
From-SVN: r29205
1999-09-08 04:46:28 -07:00
Andreas Schwab
29ffdfbb0f
* cccp.c (main): Fix handling of -include and -imacros options.
...
From-SVN: r29204
1999-09-08 09:43:16 +00:00
Nathan Sidwell
661d2b52d4
sizeof3.C: New test.
...
* g++.old-deja/g++.other/sizeof3.C: New test.
* g++.old-deja/g++.other/sizeof4.C: New test.
* g++.old-deja/g++.other/ambig2.C: Mark XFAILs.
* g++.old-deja/g++.other/lookup16.C: Mark XFAIL.
From-SVN: r29203
1999-09-08 08:50:57 +00:00
Mark Klein
a27995df2b
* configure.in: Add mpeix.mt make fragment.
...
From-SVN: r29202
1999-09-08 02:40:16 -06:00
Jeffrey A Law
236d1439f3
* cpplib.c (cpp_push_buffer): Fix order of arguments.
...
From-SVN: r29201
1999-09-08 02:24:39 -06:00
Jeff Garzik
6659980655
* libiberty.h (xmemdup): Add prototype for new function.
...
From-SVN: r29200
1999-09-08 02:20:11 -06:00
Jeff Garzik
b10647f1b2
xmemdup.c: New xmemdup function.
...
* xmemdup.c: New xmemdup function.
* Makefile.in, makefile.vms, vmsbuild.com: Use xmemdup.[co].
From-SVN: r29199
1999-09-08 02:19:52 -06:00
Alexandre Oliva
8984583485
rtl.h (obstack_alloc_rtx): Removed, it's now static in genrtl.c.
...
* rtl.h (obstack_alloc_rtx): Removed, it's now static in
genrtl.c.
From-SVN: r29198
1999-09-08 07:52:57 +00:00
Jeff Law
aaa8a002e3
Daily bump.
...
From-SVN: r29197
1999-09-08 01:45:08 -06:00
Alasdair Baird
355fca3e4f
flow.c (insn_dead_p): Use XEXP rather than SUBREG_REG.
...
* flow.c (insn_dead_p): Use XEXP rather than SUBREG_REG.
* haifa-sched.c (sched_analyze_1): Use XEXP rather than SUBREG_REG
and SET_DEST. Update comment.
From-SVN: r29196
1999-09-08 00:34:47 -07:00
Michael Hayes
7eb3fb5f92
c4x.c: Include ggc.h.
...
* config/c4x/c4x.c: Include ggc.h.
(c4x_add_gc_roots): New function.
(c4x_override_options): Call c4x_add_gc_roots.
From-SVN: r29195
1999-09-08 07:11:02 +00:00
Richard Henderson
64f8a71830
defaults.h (TARGET_ESC): Move ...
...
* defaults.h (TARGET_ESC): Move ...
* system.h: ... here, where Linas had it in the first place. Silly me.
From-SVN: r29194
1999-09-08 00:01:41 -07:00
Tom Tromey
400ec27079
posix-threads.h (_Jv_PthreadCheckMonitor): Changed test in __m_count case.
...
* include/posix-threads.h (_Jv_PthreadCheckMonitor): Changed test
in __m_count case.
From-SVN: r29193
1999-09-08 07:01:32 +00:00
Linas Vepstas
f3ad1f9c0d
Linas Vepstas <linas@linas.org>
...
* c-common.c: Use ISGRAPH, ISLOWER, toupper.
* c-lex.c, cccp.c, cexp.c, cexp.y, cppexp.c, dwarf2out.c, genattr.c,
genattrtab.c, genemit.c, genextract.c, genpeep.c, tree.c: Likewise.
* system.h (IN_CTYPE_DOMAIN): Define to 1 if HOST_EBCDIC.
* defaults.h (TARGET_ESC): Add default.
From-SVN: r29192
1999-09-07 23:51:23 -07:00
Linas Vepstas
a2b368b6e9
configure.in: add i370-*-openedition, i370-*-mvs and i370-*-linux targets
...
* configure.in: add i370-*-openedition, i370-*-mvs and
i370-*-linux targets
From-SVN: r29191
1999-09-07 23:37:28 -07:00