- 09 Sep, 1999 3 commits
-
-
mmitchel authored
(finish_switch_cond): Likewise. * parse.y (simple_stmt): Adjust accordingly. * parse.c: Regenerated. * pt.c (tsubst_expr): Adjust accordingly. * semantics.c (expand_cond): New function. (FINISH_COND): New macro. (begin_switch_stmt): Build the SWITCH_STMT here. (finish_switch_stmt_cond): Not here. (expand_stmt): Adjust calls to begin_switch_stmt and finish_switch_cond. Use expand_cond throughout. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29246 138bc75d-0d04-0410-961f-82ee72b054a4
-
mmitchel authored
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29240 138bc75d-0d04-0410-961f-82ee72b054a4
-
mmitchel authored
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29225 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 08 Sep, 1999 1 commit
-
-
mmitchel authored
(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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29211 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 07 Sep, 1999 1 commit
-
-
mmitchel authored
* class.c (make_method_vec): Remove. (free_method_vec): Likewise. (free_method_vecs): Remove. (add_method): Don't use them. * cp-tree.def (PTRMEM_CST): Make it longer. (TEMPLATE_PARM_INDEX): Make it shorter. * cp-tree.h (BINDING_HAS_LEVEL_P): New macro. (template_parm_index): Remove RTL field. (ptrmem_cst): Add RTL field. (finish_function): Removed parameter. (process_next_inline): Change prototype. (init_cplus_unsave): Rename to init_tree. (binding_init): Remove. * decl.c (free_binding_nodes): Remove. (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P. (pop_binding): Don't use free_binding_nodes. (free_binding_vecs): Remove. (store_bindings): Don't use them. (pop_from_top_level): Likewise. (lookup_namespace_name): Simplify. (build_typename_type): Don't use obstack_free. (unqualified_namespace_lookup): Simplify. (lookup_name_real): Simplify. (start_function): Remove comment about leaks. (finish_function): Removed nested parameter. Call expand_end_bindings even when building_stmt_tree. Call ggc_push_context and ggc_pop_context around rest_of_compilation, if necessary. (mark_cp_function_context): Handle a NULL language-context. (lang_mark_false_label_stack): Fix typo. (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD, TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on pointer to method types. (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC. * decl2.c (finish_objects): Adjust call to finish_function. (finish_static_store_duration_function): Likewise. (do_nonmember_using_decl): Remove call to binding_init. * except.c (end_anon_func): Adjust call to finish_function. * lex.c (mark_impl_file_chain): New function. (init_parse): Call init_tree, not init_cplus_unsave. Add GC roots. (cp_pramga_interface): Use xmalloc, not permalloc. (cp_pragma_implementation): Likewise. (begin_definition_of_inclass_inline): Simplify. (process_next_inline): Adjust prototype. (do_scoped_id): Don't call binding_init. (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc. * method.c (emit_thunk): Adjust call to finish_function. (synthesize_method): Likewise. * parse.y (%union): Add a new `pi' variant. (PRE_PARSED_FUNCTION_DECL): Use it. (fn.defpen): Likewise. (fndef): Adjust call to finish_function. * pt.c (instantiate_decl): Likewise. * rtti.c (syntheisze_tinfo_fn): Likewise. * semantics.c (expand_body): Likewise. * tree.c: Include ggc.h. (mark_list_hash): New function. (binding_init): Remove. (init_cplus_unsave): Rename to ... (init_tree): This. Add GC roots. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29173 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 06 Sep, 1999 1 commit
-
-
mmitchel authored
* Makefile.in (CXX_TREE_H): Add varray.h (lex.o): Depend on ggc.h. (decl.o): Likewise. (decl2.o): Likewise. (method.o): Likewise. (search.o): Likewise. (pt.o): Likewise. (repo.o): Likewise. * class.c: Include ggc.h. (current_class_name): Remove. (current_class_type): Likewise. (current_access_specifier): Likewise. (previous_class_type): Likewise. (previous_class_values): Likewise. (class_cache_firstobj): Likewise. (current_lang_base): Likewise. (current_lang_stack): Likewise. (current_lang_stacksize): Likewise. (lang_name_c): Likewise. (lang_name_cplusplus): Likewise. (lang_name_java): Likewise. (current_lang_name): Likewise. (base_layout_decl): Likewise. (access_default_node): Likewise. (access_public_node): Likewise. (access_protected_node): Likewise. (access_private_node): Likewise. (access_default_virtual_node): Likewise. (access_public_virtual_node): Likewise. (access_protected_virtual_node): Likewise. (access_private_virtual_node): Likewise. (signed_zero_node): Likewise. (init_class_processing): Don't build base_layout_decl. (push_lang_context): Adjust now that current_lang_base is a varray. (pop_lang_context): Likewise. * cp-tree.h: Include varray.h. (cp_global_trees): Add access_default, access_public, access_protected, access_private, access_default_virtual, access_public_virtual, access_protected_virtual, access_private_virtual, ctor_identifier, delta2_identifier, delta_identifier, dtor_identifier, in_charge_identifier, index_identifier, nelts_identifier, this_identifier, pfn_identifier, pfn_or_delta2_identifier, vptr_identifier, lang_name_c, lang_name_cplusplus, lang_name_java, empty_except_spec, null, jclass, minus_one, terminate. (saved_scope): Move here from decl.c. Define globals in terms of saved_scope: current_namespace, current_class_name, current_class_type, current_access_specifier, current_lang_stack, current_lang_base, current_lang_name, current_function_parms, current_template_parms, processing_template_decl, processing_specialization, processing_explicit_instantiation, previous_class_type, previous_class_values, class_cache_firstobj. (scope_chain): New variable. (init_pt): New function. * decl.c (current_namespace): Remove. (this_identifier, in_charge_identifier, ctor_identifier): Likewise. (dtor_identifier, pfn_identifier, index_identifier): Likewise. (delta_identifier, delta2_identifier): Likewise. (pfn_or_delta2_identifier, tag_identifier): Likewise (vt_off_identifier, empty_except_spec, null_node): Likewise. (current_function_parms, current_lang_base): Remove. (current_lang_stack, previous_class_values): Remove. (class_binding_level): Macroize. (saved_scope): Remove. (current_saved_scope): Rename to scope_chain. (mark_saved_scope): Adjust for new scope structure. (maybe_push_to_top_level): Likewise. (pop_from_top_level): Likewise. (duplicate_decls): Adjust now that current_lang_base is a varray. (build_typename_type): Call ggc_add_tree_hash_table_root. (init_decl_processing): Call init_pt. Call push_to_top_level to set up globals. Add GC roots. (xref_basetypes): Adjust now that current_lang_base is a varray. * decl.h (this_identifier): Remove. (in_charge_identifier): Likewise. * decl2.c: Don't include varray.h. (current_namespace): Remove. (init_decl2): Add GC roots. * except.c (Terminate): Remove. (init_exception_processing): Use terminate_node instead. (build_terminate_handler): Likewise. * init.c (nc_nelts_field_id): Remove. (minus_one): Likewise. (init_init_processing): Use minus_one_node and nelts_identifier instead. Add GC roots. (jclass_node): Remove. (build_new_1): Use nelts_identifier. (build_vec_init): Likewise. (build_vec_delete): Likewise. * lex.c: Include ggc.h. (defarg_fn): Move declaration early. (defarg_parms): Likewise. (init_parse): Add GC roots. (handle_cp_pragma): Remove redundant declaration of pending_vtables. * method.c: Include ggc.h. (btypelist): Make it a varray. All uses changed. (ktypelist): Likewise. (init_method): Add GC roots. * pt.c: Don't include varray.h. Include ggc.h. (current_template_parms): Remove. (processing_template_decl): Likewise. (processing_specialization): Likewise. (processing_explicit_instantiation): Likewise. (init_pt): New function. * repo.c: Include ggc.h. (init_repo): Add GC roots. * search.c: Don't include varray.h. (_vptr_name): Remove. (lookup_field_1): Use vtpr_identifier instead. (expand_indirect_vtbls_init): Remove redundant declaration of in_charge_identifier. (init_search_processing): Use vptr_identifier. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29135 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 02 Sep, 1999 2 commits
-
-
mmitchel authored
(cp_function_chain): Declare. (dtor_label): New macro, instead of variable. (ctor_label): Likewise. (current_base_init_list): Likewise. (current_member_init_list): Likewise. (base_init_expr): Likewise. (current_class_ptr): Likewise. (current_class_ref): Likewise. (last_tree): Likewise. (last_expr_type): Likewise. (current_function_returns_value): Likewise. (current_function_returns_null): Likewise. (current_function_just_assigned_this): Likewise. (current_function_parms_stored): Likewise. (temp_name_counter): Likewise. (static_labelno): Likewise. (expanding_p): Likewise. (stmts_are_full_exprs_p): Likewise. (in_function_try_handler): Likewise. (lang_type): Remove nested type_flags. All uses changed. * call.c (ctor_label): Remove. (dtor_label): Likewise. * class.c (current_class_ptr): Remove. (current_class_ref): Likewise. * decl.c (static_labelno): Remove. (dtor_label): Likewise. (last_dtor_insn): New macro, instead of variable. (last_parm_cleanup_insn): Likewise. (original_result_rtx): Likewise. (in_function_try_handler): Remove. (named_label_uses): New macro, instead of variable. (named_labels): Likewise. (current_function_returns_value): Remove. (current_function_returns_null): Likewise. (current_function_assigns_this): New macro, instead of variable. (current_function_just_assigned_this): Likewise. (current_binding_level): Likewise. (init_decl_processing): Call push_cp_function_context. (cp_function): Move to cp-tree.h (cp_function_chain): Make it global. (temp_name_counter): Remove. (push_cp_function_context): Simplify. (pop_cp_function_context): Likewise. * decl2.c (temp_name_counter): Remove. * init_c (current_base_init_list): Likewise. (current_member_init_list): Likewise. (base_init_expr): Likewise. * method.c (static_labelno): Likewise. * pt.c (last_tree): Likewise. * semantics.c (expanding_p): Likewise. (stmts_are_full_exprs_p): Likewise. (last_expr_type): Likewise. * typeck.c (dtor_label): Likewise. (ctor_label): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29062 138bc75d-0d04-0410-961f-82ee72b054a4
-
mmitchel authored
(arg_assoc_class): Use arg_assoc_template_arg for template arguments. (arg_assoc): Likewise. * pt.c (mangle_class_name_for_template): Allow member template template arguments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29060 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 30 Aug, 1999 2 commits
-
-
mmitchel authored
(expand_start_catch_block): Take only one parameter. (start_handler_parms): New function. * decl.c (start_handler_parms): Define it. * except.c (process_start_catch_block): Take only one parameter. Don't call grokdeclarator here. (expand_start_catch_block): Don't call grokdeclarator here, either. * parse.y (handler_args): Adjust call to expand_start_catch_block. Use start_handler_parms. * pt.c (push_template_decl_real): Make permanent lists have permanent elements. (tsubst_expr): Adjust calls to expand_start_catch_block appropriately. * semantics.c (expand_stmt): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28983 138bc75d-0d04-0410-961f-82ee72b054a4
-
mmitchel authored
class type if it exists. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28978 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 29 Aug, 1999 1 commit
-
-
mmitchel authored
(maybe_inject_for_scope_var): Declare it. (initialize_local_var): Likewise. * decl.c (maybe_inject_for_scope_var): Make it global. (initialize_local_var): Likewise. Move cleanup handling here, from cp_finish_decl. (make_rtl_for_nonlocal_decl): Use push_obstacks_nochange/pop_obstacks, rather than end_temporary_allocation/resume_temporary_allocation. (cp_finish_decl): Try to complete the type of a variable when it is declared. Move cleanup-handling to initialize_local_var. (expand_static_init): Use tree-building code, rather than RTL-building code. * decl2.c (get_temp_name): Assert non-initializedness of temporaries. * init.c (create_temporary_var): Move RTL-assigning code to ... (get_temp_regvar): Here. * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here. * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just call initialize_local_var to generate initialization code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28973 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 28 Aug, 1999 1 commit
-
-
mmitchel authored
(LABEL_STMT_LABEL): New macro. (shadow_label): Remove. (declare_local_label): New function. (finish_label_decl): Likewise. * decl.c (make_label_decl): New function, split out from lookup_label. (shadowed_labels): Remove. (binding_level): Add shadowed_labels. (clear_binding_level): Remove. (push_binding_level): Just bzero the new binding level. (pushlevel): Fix indentation. (pop_label): New function. (pop_labels): Likewise, split out from poplevel. (poplevel): Pop local labels. Use pop_labels. (maybe_push_to_top_level): Don't clear shadowed_labels. (lookup_label): Use make_label_decl. (shadow_label): Remove. (declare_local_label): New function. (define_label): Simplify. (start_function): Don't clear shadowed_labels. (cp_function): Remove shadowed_labels. (push_cp_function_context): Don't save shadowed_labels. (pop_cp_function_context): Don't restore it. * dump.c (dequeue_and_dump): Handle LABEL_STMT. * parse.y (label_decl): Use finish_label_decl. * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label declarations. * semantics.c (finish_label_stmt): Add a LABEL_STMT when building_stmt_tree. (finish_label_decl): New function. (expand_stmt): Handle LABEL_STMTs and local label declarations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28943 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 27 Aug, 1999 1 commit
-
-
mmitchel authored
when building statement trees. Don't build RTL for labels when building statement trees. * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when building statement trees. (finish_label_stmt): Likewise. (expand_stmt): Adjust accordingly. * pt.c (tsubst_expr); Likewise. (do_decl_instantiation): Robustify. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28918 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 25 Aug, 1999 1 commit
-
-
mmitchel authored
* cp-tree.h (CLEANUP_P): New macro. (SUBOBJECT_CLEANUP): Likewise. (keep_next_level): Add parameter. (get_temp_regvar): Don't declare. (emit_base_init): Remove parameter. (expand_aggr_init): Rename to build_aggr_init. (expand_vec_init): Rename to build_vec_init. (do_pushlevel): Remove. (do_poplevel): Likewise. (finish_cleanup): New function. (finish_subobject): Likewise. (stmts_are_full_exprs_p): New variable. * decl.c (keep_next_level): Add parameter. (cp_finish_decl): Use build_aggr_init, not expand_aggr_init. Use finish_expr_stmt to expand the code. (expand_static_init): Use tree-generating, not RTL-generating, functions to handle the initialization. (start_function): Remove dead code. Always have a momentary obstack inside the function, even before hitting the first curly brace. (cplus_expand_expr_stmt): Move calls to expand_{start,end}_target_temps into semantics.c. (cp_function): Add stmts_are_full_exprs_p. (push_cp_function_context): Save it. (pop_cp_function_context): Restore it. * decl2.c (get_temp_regvar): Move to init.c. (do_static_initialization): Use build_{aggr,vec}_init. (do_static_destruction): Fix typo in comment. * dump.c (dequeue_and_dump): Handle INIT_EXPR. * except.c (expand_throw): Use create_temporary_var. * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init. * init.c (expand_vec_init_try_block): Remove. (expand_vec_init_catch_clause): Likewise. (get_temp_regvar): New function. (begin_init_stmts): Likewise. (finish_init_stmts): Likewise. (perform_member_init): Use build_{aggr,vec}_init. Build up tree structure here. (emit_base_init): Likewise. Remove unused parameter. (expand_virtual_init): Likewise. (expand_cleanup_for_base): Use finish_subobject. (expand_aggr_vbase_init_1): Simplify. (construct_virtual_bases): Use tree-generating functions to build up initialization. (expand_aggr_init): Likewise. Rename to build_aggr_init. (expand_default_init): Likewise. (expand_aggr_init_1): Likewise. (expand_vec_init): Rename to build_vec_init. * method.c (do_build_copy_constructor): Use tree-generating functions. Don't call clear_last_expr. (do_build_assign_ref): Likewise. (synthesize_method): Call clear_last_expr here. * parse.y (base_init): Don't call clear_last_expr here. (nodecls): Likewise. * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set. * semantics.c (do_pushlevel): Move to here. (do_poplevel): Likewise. (stmts_are_full_exprs_p): New variable. (finish_expr_stmt): Handle logic for temoprary cleanup here. (finish_for_stmt): Use finish_expr_stmt. (finish_cleanup): New function. (finish_function_try_block): Fix indentation. (finish_subobject): New function. (setup_vtbl_ptr): Call keep_next_level here. (finish_stmt_expr): Handle a block with no scope inside the statement-expression. (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle SUBOBJECT. * tree.c (search_tree): Handle INIT_EXPR. (mapcar): Likewise. * typeck.c (build_modify_expr): Don't build an RTL_EXPR. * typeck2.c (store_init_value): Change expand_aggr_init to build_aggr_init in comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28878 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 22 Aug, 1999 1 commit
-
-
mmitchel authored
* dump.c (dump_next_stmt): New function. (dequeue_and_dump): Use it. * pt.c (tsubst_copy): Make sure to initialize return value for a STMT_EXPR, even when processing_template_decl. * semantics.c (finish_stmt_expr): A statement-expression whose last statement is not an expression-statement has type `void'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28804 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 20 Aug, 1999 2 commits
-
-
mmitchel authored
* tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR. (mapcar): Likewise. * init.c (build_vec_delete_1): Make the children of a permanent BIND_EXPR permanent. * pt.c (register_specialization): Don't register a specialization more than once. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28781 138bc75d-0d04-0410-961f-82ee72b054a4
-
mmitchel authored
arguments in both directions. * typeck.c (common_type): Undo 1999-08-18 change. Remove compiler_error message. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28774 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 19 Aug, 1999 2 commits
-
-
jason authored
* pt.c (do_decl_instantiation): Don't complain about duplicate instantiation with -frepo. (do_type_instantiation): Likewise. * pt.c (push_template_decl_real): Complain about everything that isn't a valid template. * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't affect inlines. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28767 138bc75d-0d04-0410-961f-82ee72b054a4
-
mmitchel authored
* decl2.c (build_expr_from_tree): Handle it. * error.c (dump_expr): Likewise. * pt.c (for_each_template_parm): Likewise. (tsubst_copy): Likewise. * tree.c (search_tree): Likewise. * semantics.c (finish_pseudo_destructor_call): Create it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28760 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 18 Aug, 1999 1 commit
-
-
mmitchel authored
* class.c (build_vtable): Replace calls to build_lang_field_decl with build_lang_decl. (prepare_fresh_vtable): Likewise. (finish_struct_1): Likewise. (init_class_processing): Likewise. * decl.c (push_using_decl): Likewise. (init_decl_processsing): Likewise. (grokvardecl): Likewise. (build_ptrmemfunc_type): Likewise. (grokdeclarator): Likewise. (build_enumerator): Likewise. * decl2.c (grok_x_components): Likewise. (do_class_using_decl): Likewise. * except.c (call_eh_info): Likewise. * init.c (init_init_processing): Likewise. * rtti.c (expand_class_decl): Likewise. * tree.c (build_base_fields): Likewise. (build_vbase_pointer_fields): Likewise. * lex.c (build_lang_decl): Build declarations on the permanent obstack if we're building statmeent trees. (retrofit_lang_decl): Handle both the full lang_decl and also the smaller lang_decl_flags here. (build_lang_field_decl): Remove. * pt.c (push_template_decl_real): Issue errors for variable declarations that are not static members. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28755 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 17 Aug, 1999 2 commits
-
-
mmitchel authored
(push_local_binding): Use it. (find_binding): Fix typo in comment. (pushdecl): Use add_decl_to_level. Put templates on the corresponding namespace-scope binding levels. * dump.c (dequeue_and_dump): Print the specializations of a template. * pt.c (push_template_decl_real): Don't push a template multiple times. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28738 138bc75d-0d04-0410-961f-82ee72b054a4
-
mmitchel authored
(CALL_DECLARATOR_QUALS): Likewise. (CALL_DECARATOR_EXCEPTION_SPEC): Likewise. * decl.c (grokdeclarator): Adjust to use them. * decl2.c (grokfield): Likewise. (reparse_absdcl_as_casts): Likewise. * lex.c (make_call_declarator): Likewise. (set_quals_and_spec): Likewise. * pt.c (tsubst): Likewise. * tree.c (mapcar): Remove special hack to handle third operand of a CALL_EXPR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28733 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 16 Aug, 1999 2 commits
-
-
mmitchel authored
* cp-tree.h (STMT_EXPR_STMT): New macro. (store_return_init): Change prototype. (finish_named_return_value): New function. (expand_stmt): Likewise. (expand_body): Likewise. (begin_stmt_tree): Likewise. (finish_stmt_tree): Likewise. (expanding_p): New variable. (last_expr_type): Likewise. (building_stmt_tree): New macro. * decl.c (start_function): Use building_stmt_tree, not processing_template_decl, where appropriate. (store_parm_decls): Likewise. (store_return_init): Move most of the body to semantics.c. (finish_function): Use building_stmt_tree. (finish_stmt): Clear last_expr_type here. (cp_function): Add expanding_p, last_tree, last_expr_type. (push_cp_function_context): Save them. (pop_cp_function_context): Restore them. * decl2.c (setup_vtbl_ptr): Move to semantics.c. * error.c (dump_expr): Handle STMT_EXPR. * except.c (expand_start_catch_block): Use building_stmt_tree. Use add_decl_stmt. * expr.c (cplus_expand_expr): Handle STMT_EXPR. (do_case): Move add_tree call to semantics.c. * parse.y (return_init): Use finish_named_return_value. (for.init.statement): Use finish_expr_stmt. * parse.c: Regenerated. * pt.c (do_pushlevel): Move to semantics.c. (do_poplevel): Likewise. (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR. (tsubst_expr): Don't expand all the way to RTL here. Handle RETURN_INIT and CTOR_INITIALIZER. (instantiate_decl): Call expand_body after tsubst'ing into DECL_SAVED_TREE. * semantics.c (expand_stmts): New function. (expanding_p): New variable. (last_expr_type): Likewise. (finish_expr_stmt): Use building_stmt_tree. (begin_if_stmt): Likewise. (finish_if_stmt_cond): Likewise. (finish_then_clause): Likewise. (begin_else_clause): Likewise. (finish_else_clause): Likewise. (begin_while_stmt): Likewise. (finish_while_stmt_cond): Likewise. (finish_while_stmt): Likewise. (finish_do_body): Likewise. (finish_do_stmt): Likewise. (finish_return_stmt): Likewise. (begin_for_stmt): Likewise. (fnish_for_init_stmt): Likewise. (finish_for_cond): Likewise. (finish_for_expr): Likewise. (finish_for_stmt): Likewise. (finish_break_stmt): Likewise. (finish_continue_stmt): Likewise. (finish_switch_cond): Likewise. (finish_switch_stmt): Likewise. (finish_case_label): Call add_tree here if necessary. (finish_goto_statement): Use building_stmt_tree. (begin_try_block): Likewise. (begin_function_try_block): Likewise. (finish_try_block): Likewise. (finish_function_try_block): Likewise. (finish_handler_sequence): Likewise. (finish_function_handler_sequence): Likewise. (begin_handler): Likewise. (finish_handler_parms): Likewise. (finish_handler): Likewise. (begin_compound_stmt): Likewise. (finish_compound_stmt): Likewise. (finish_asm_stmt): Likewise. (finish_label_stmt): Likewise. (finish_named_return_value): New function. (setup_vtbl_ptr): Moved here from decl2.c. (do_pushlevel): Moved here from pt.c. (do_poplevel): Likewise. (begin_stmt_expr): Use building_stmt_tree. (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR, when building_stmt_tree. (begin_stmt_tree): New function. (finish_stmt_tree): Likewise. (expand_stmt): Likewise. (expand_body): Likewise. * tree.c (build_cplus_method_type): Make sure the argument types end up on the same obstack as the METHOD_TYPE. (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR, THROW_EXPR, STMT_EXPR. (mapcar): Break out common cases. Handle COMPOUND_EXPR, MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than sorry, if an unsupported node is encountered. * typeck.c (require_complete_type_in_void): Handle BIND_EXPR. (c_expand_return): Don't call add_tree here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28729 138bc75d-0d04-0410-961f-82ee72b054a4
-
mmitchel authored
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28718 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 15 Aug, 1999 1 commit
-
-
mmitchel authored
(tsubst_decl): Make sure the declaration is on a saveable obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local variable. (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28715 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 14 Aug, 1999 1 commit
-
-
mmitchel authored
* cp-tree.h (lang_decl_flags): Move saved_tree to ... (lang_decl): ... here. Add next. (DECL_SAVED_TREE): Adjust accordingly. (DECL_IMPLICIT_TYPEDEF_P): New macro. (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise. (DECL_STMT_DECL): Likewise. (create_implicit_typedef): New function. (maybe_push_decl): Likewise. (tsubst_default_argument): New function. (at_function_scope_p): Likewise. (add_decl_stmt): Likewise. (push_permanent_obstack): Likewise. * call.c (convert_default_arg): Use tsubst_default_argument. * class.c (add_method): Use push_permanent_obstack. (build_self_reference): Create a TEMPLATE_DECL for the self-reference, if necessary. * decl.c (pseudo_global_level_p): Only look at the current binding level. (push_binding): Use push_permanent_obstack. (create_implicit_typedef): New function. (pushtag): Use it. (duplicate_decls): Use push_permanent_obstack. (maybe_push_decl): New function. (start_decl): Use it. Remove dead code. Use add_decl_stmt. (start_decl_1): Remove dead code. (cp_finish_decl): Remove DECL_STMT handling here. Don't use pseudo_global_level_p. (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a template. (grokdeclarator): Likewise, for TYPE_DECLs. Don't use pseudo_global_level_p. * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in a template. (get_sentry): Use push_permanent_obstack. * dump.c (dequeue_and_dump): Enable DECL_STMT. * except.c (call_eh_info): Use push_permanent_obstack. (build_eh_type_ref): Likewise. (do_pop_exception): Likewise. (expand_eh_spec): Likewise. (alloc_eh_object): Likewise. (expand_throw): Likewise. * init.c (build_java_class_ref): Likewise. * lex.c (get_time_identifier): Likewise. (free_lang_decl_chain): Correct type. (retrofit_lang_decl): Adjust accordingly. (build_lang_field_decl): Likewise. * lex.h (free_lang_decl_chain): Likewise. * parse.y (lang_extdef): Don't use pseudo_global_level_p. * parse.c: Regenerated. * pt.c (tsubst_default_arguments): New function. (retrieve_local_specialization): Likewise. (register_local_specialization): Likewise. (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use pseudo_global_level_p to determine whether or not a template is primary. (lookup_template_class): Likewise. Use create_implicit_typedef. (instantiate_class_template): Call tsubst_default_arguments for member functions, if appropriate. (tsubst_default_argument): New function. (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs. * search.c (at_function_scope_p): New function. * semantics.c (finish_asm_stmt): Use push_permanent_obstack. (finish_label_stmt): Likewise. (add_decl_stmt): New function. (begin_class_definition): Likewise. (finish_typeof): Likewise. * tree.c (copy_template_template_parm): Likewise. (copy_to_permanent): Likewise. (push_permanent_obstack): Define. (mark_addressable): Use it. * typeck.c (mark_addressable): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28709 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 13 Aug, 1999 2 commits
-
-
mmitchel authored
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28706 138bc75d-0d04-0410-961f-82ee72b054a4
-
mmitchel authored
decl_constant_value to simplify array bounds. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28702 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 12 Aug, 1999 1 commit
-
-
mmitchel authored
(finish_label_stmt): New function. * decl.c (saved_scope): Remove minimal parse mode. (maybe_push_to_top_level): Don't save it. (pop_from_top_level): Don't restore it. (define_label): Split out template-handling code to semantics.c. (start_decl): Don't use minimal_parse_mode. (cp_finish_decl): Likewise. (start_function): Don't increment it. (store_return_init): Don't use it. (finish_function): Don't decrement it. * parse.y (label_colon): Use finish_label_stmt throughout. * parse.c: Regenerated. * pt.c (minimal_parse_mode): Don't define it. (tsubst_expr): Use finish_label_stmt. * semantics.c (finish_label_stmt): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28682 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 09 Aug, 1999 1 commit
-
-
jason authored
finish_function_handler_sequence): New fns. * parse.y (function_try_block): Use them. * pt.c (instantiate_decl): Likewise. * cp-tree.h: Declare in_function_try_handler. * decl.c: Define it. (start_function): Clear it. (struct cp_function, push_cp_function_context): Save it. (pop_cp_function_context): Restore it. * parse.y (function_try_block): Set and clear it. * except.c (expand_end_catch_block): Rethrow if we reach the end of a function-try-block handler in a ctor or dtor. * typeck.c (c_expand_return): Complain about returning from a function-try-block handler of a ctor. * parse.y (function_try_block): Call end_protect_partials before expand_start_all_catch. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28624 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 08 Aug, 1999 1 commit
-
-
jason authored
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28598 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 07 Aug, 1999 2 commits
-
-
jason authored
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28587 138bc75d-0d04-0410-961f-82ee72b054a4
-
jason authored
pointer. * pt.c (maybe_get_template_decl_from_type_decl): Make sure that we're looking at a class. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28562 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 06 Aug, 1999 1 commit
-
-
oliva authored
index type. Fixes g++.oliva/dwarf1.C. * decl.c (grokdeclarator): Likewise, just for consistency, as it doesn't seem to trigger the bug without it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28556 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 04 Aug, 1999 1 commit
-
-
nathan authored
(compexcepttypes): Remove prototype. (comp_except_specs): Prototype new global function. (add_exception_specifier): Prototype new global function. * decl.c (empty_except_spec): Define new global var. (duplicate_decls): Use comp_except_specs, reword error message. (init_decl_processing): Initialize empty_except_spec. Adjust build_exception_variant calls. * parse.y (exception_specification_opt): Use empty_except_spec. (ansi_raise_identifier): Call check_for_new_type. (ansi_raise_identifiers): Use add_exception_specifier. * pt.c (tsubst): Use add_exception_specifier to build exception specifier. * search.c (check_final_overrider): New static function, broken out of get_matching_virtual. Check throw specifiers, reword diagnostics. (get_matching_virtual): Use check_final_overrider. * tree.c (build_exception_variant): Use comp_except_specs. * typeck.c (compexcepttypes): Remove. (comp_except_types): New static function, helper for comp_except_specs. Compare two types as exception specifiers. (comp_except_specs): New global function, compare two exception specifiers. (comptypes): Adjust for comp_except_specs. * typeck2.c (add_exception_specifier): New global function. * class.c (check_for_override): Reword error message. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28494 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 03 Aug, 1999 2 commits
-
-
mmitchel authored
* Make-lang.in (CXX_SRCS): Add dump.c. * Makefile.in (CXX_OBJS): Add dump.o. (dump.o): New target. * cp-tree.h (DECL_CONV_FN_P): Document. (DECL_OVERLOADED_OPERATOR_P): New function. (TYPE_PTRMEM_CLASS_TYPE): New macro. (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise. (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE. (ASM_VOLATILE_P): New macro. (STMT_LINENO): Likewise. (cp_namespace_decls): New function. (dump_node_to_file): New function. * decl.c (cp_namespace_decls): New function. (walk_namespaces_r): Use it. (wrapup_globals_for_namespace): Likewise. * decl2.c (flag_dump_translation_unit): New variable. (lang_decode_option): Handle -fdump-translation-unit. (finish_file): If flag_dump_translation_unit is set, dump the translation unit. * dump.c: New file. * lang-options.h: Add -fdump-translation-unit. * pt.c (tsubst_template_parms): Robustify. (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P. (tsubst_expr): Use STMT_LINENO. * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check for invalid cv-qualifiers even while building templates. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28434 138bc75d-0d04-0410-961f-82ee72b054a4
-
rth authored
* decl.c: Likewise. * pt.c: Likewise. * typeck.c: Include defaults.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28432 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 02 Aug, 1999 1 commit
-
-
rth authored
* call.c (convert_default_arg, build_over_call): Change all uses of PROMOTE_PROTOTYPES, so that it tests it as a C expression. Ensure expr.h is included. * decl.c (grokparams): Ditto. * pt.c (tsubst_decl): Ditto. * typeck.c (convert_arguments): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28418 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 27 Jul, 1999 1 commit
-
-
jason authored
* pt.c (determine_specialization): Fix uninitialized warning. * lex.c (real_yylex): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28302 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 26 Jul, 1999 1 commit
-
-
mmitchel authored
(ARITHMETIC_TYPE_P): Adjust definition for standard conformance. (strip_top_quals): Declare. (ncp_convert): Likewise. (type_after_usual_arithmetic_converions): Likewise. (composite_pointer_type): Likewise. * call.c (strip_top_quals): Don't make it static. (promoted_arithmetic_type_p): New function. (conditional_conversion): Likewise. (null_ptr_cst_p): Allow `false' as a NULL pointer constant. (standard_conversion): Use same_type_p. Don't build BASE_CONVs for converting a type to itself. (reference_binding): Honor LOOKUP_NO_TEMP_BIND. (implicit_conversion): Make sure the from and to types are complete. (add_builtin_candidate): Correct handling of ?: operator. (add_builtin_candidates): Improve documentation. (build_conditional_expr): New function. (can_convert): Implement in terms of can_convert_arg. (ncp_convert): New function. * typeck.c (type_after_usual_arithmetic_conversions): New function, split out from common_type. (composite_pointer_type): New function, split out from build_conditional_expr. (common_type): Use type_after_usual_arithmetic_conversions. Remove redundant attribute merging. (comptypes): Tidy. Handle COMPLEX_TYPE. (build_binary_op_nodefault): Use null_ptr_cst_p. (build_conditional_expr): Remove. (convert_for_assignment): Use new conversion functions. * cp-tree.h (abstract_virtuals_error): Change declaration. * typeck2.c (abstract_virtuals_error): Check to see if an error ocurred, and return a boolean value accordingly. (build_functional_cast): Adjust accordingly. * class.c (finish_struct_1): Likewise. * cvt.c (ocp_convert): Likewise. * decl.c (cp_finish_decl): Likewise. (grokparams): Likewise. (grok_op_properties): Likewise. (start_function): Likewise. * init.c (build_new_1): Likewise. * pt.c (unify): Don't get confused by pointers-to-member functions. * search.c (build_cplus_new): Robustify. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28262 138bc75d-0d04-0410-961f-82ee72b054a4
-