1. 05 Jul, 2003 1 commit
    • call.c: Fix comment typos. · 34cd5ae7
      	* call.c: Fix comment typos.
      	* class.c: Likewise.
      	* cp-tree.h: Likewise.
      	* cvt.c: Likewise.
      	* decl2.c: Likewise.
      	* decl.c: Likewise.
      	* init.c: Likewise.
      	* mangle.c: Likewise.
      	* parser.c: Likewise.
      	* pt.c: Likewise.
      	* search.c: Likewise.
      	* semantics.c: Likewise.
      	* tree.c: Likewise.
      	* typeck.c: Likewise
      
      From-SVN: r68956
      Kazu Hirata committed
  2. 04 Jul, 2003 1 commit
    • call.c (build_addr_func): Handle bound pointers-to-members. · d6b4ea85
      	* call.c (build_addr_func): Handle bound pointers-to-members.
      	(build_method_call): Do not call resolve_offset_ref.
      	(implicit_conversion): Likewise.
      	(resolve_scoped_fn_name): Use finish_non_static_data_member, not
      	resolve_offset_ref.
      	(resolve_args): Do not call resolve_offset_ref.
      	(build_conditional_expr): Likewise.
      	(build_new_method_call): Likewise.
      	* cp-tree.def (OFFSET_REF): Update documentation.
      	(cp_convert_to_pointer): Update handling of conversions from
      	pointers to members to pointers.
      	(ocp_convert): Do not call resolve_offset_ref.
      	(convert_to_void): Likewise.
      	(build_expr_type_conversion): Likewise.
      	(delete_sanity): Likewise.
      	(resolve_offset_ref): Simplify greatly.
      	(build_vec_delete): Do not call resolve_offset_ref.
      	* parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
      	if appropriate.
      	(cp_parser_unary_expression): Use
      	cp_parser_simple_cast_expression.
      	(cp_parser_delete_expression): Likewise.
      	(cp_parser_cast_expression): Likewise.
      	(cp_parser_pm_expression): Use cp_parser_binary_op.
      	(cp_parser_simple_cast_expression): New function.
      	* rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
      	* semantics.c (finish_increment_expr): Likewise.
      	(finish_typeof): Likewise.
      	* tree.c (lvalue_p_1): Do not handle OFFSET_REF.
      	* typeck.c (require_complete_type): Do not handle OFFSET_REFs.
      	(decay_conversion): Do not call resolve_offset_ref.
      	(finish_class_member_access_expr): Likewise.
      	(convert_arguments): Likewise.
      	(build_x_binary_op): Handle DOTSTAR_EXPR.
      	(condition_conversion): Do not call resolve_offset_ref.
      	(unary_complex_lvalue): Likewise.
      	(build_static_cast): Likewise.
      	(build_reinterpret_cast): Likewise.
      	(build_const_cast): Likewise.
      	(build_c_cast): Likewise.
      	(build_modify_expr): Likewise.
      	(convert_for_assignment): Likewise.
      	(convert_for_initialization): Likewise.
      	* typeck2.c (build_x_arrow): Likewise.
      	(build_m_component_ref): Simplify.
      
      	* g++.old-deja/g++.jason/typeid1.C: Add dg-error marker.
      	* g++.old-deja/g++.mike/net36.C: Tweak error messages.
      
      From-SVN: r68911
      Mark Mitchell committed
  3. 02 Jul, 2003 1 commit
    • decl2.c (defer_fn): Set DECL_DEFER_OUTPUT. · 8cd2462c
      	* decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
      	(finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
      	clear DECL_DEFER_OUTPUT once function is processed; avoid flags
      	massaging.
      
      	* cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
      	(expand_or_defer_fn): Declare.
      	(lower_function): Declare.
      	* decl.c (start_cleanup_fn): Use expand_or_defer_fn.
      	* decl2.c: Include cgraph.h and varpool.h
      	(maybe_emit_vtables):  Make explicit instantations as needed.
      	(mark_member_pointers, lower_function): New functions.
      	(finish_file): Do unit-at-a-time.
      	* method.c (synthesize_method): Use expand_or_defer_fn.
      	* optimize.c (maybe_clone_body): Use expand_or_defer_fn.
      	* parser.c (cp_parser_function_definition_after_decl): Use
      	expand_or_defer_fn.
      	* pt.c (instantiate_decl): Likewise.
      	* semantics.c: Include cgraph.h
      	(expand_or_defer_fn): Break out from ...
      	(expand_body): ... here; deal with unit-at-a-time.
      	* cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
      	LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
      
      From-SVN: r68801
      Jan Hubicka committed
  4. 01 Jul, 2003 1 commit
    • c-tree.h (define_label): Replace filename and lineno arguments with a location_t. · 5b030314
      	* c-tree.h (define_label): Replace filename and lineno arguments
      	with a location_t.
      	* c-decl.c (poplevel): Adjust define_label call.
      	(pop_label_level): Likewise.
      	(define_label): Replace filename and lineno arguments with a
      	location_t.
      	(store_parm_decls): Use DECL_SOURCE_LOCATION.
      	* c-parse.in (label): Adjust define_label call.
      
      	* cp/cp-tree.h (define_label): Replace filename and lineno
      	arguments with a location_t.
      	* cp/decl.c (pop_label): Adjust define_label call.
      	(define_label): Replace filename and lineno arguments with a
      	location_t.
      	* cp/semantics.c (finish_label): Adjust define_label call.
      
      	* java/decl.c (poplevel): Adjust define_label call.
      
      From-SVN: r68766
      Nathan Sidwell committed
  5. 28 Jun, 2003 1 commit
    • * c-format.c (check_format_string, get_constant) · 8ce33230
      	* cfgrtl.c (rtl_split_edge):
      	Mark the definition static, matching the forward declaration.
      cp:
      	* decl.c (build_typename_type)
      	* mangle.c (write_template_template_arg)
      	* parser.c (cp_parser_scope_through_which_access_occurs)
      	* pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
      	* repo.c (get_base_filename)
      	* semantics.c (maybe_convert_cond):
      	Mark the definition static, matching the forward declaration.
      java:
      	* class.c (build_method_symbols_entry)
      	* expr.c (get_offset_table_index)
      	* jcf-parse.c (jcf_parse):
      	Mark the definition static, matching the forward declaration.
      
      From-SVN: r68622
      Zack Weinberg committed
  6. 24 Jun, 2003 1 commit
    • call.c (enforce_access): Assert we get a binfo. · 6df5158a
      	* call.c (enforce_access): Assert we get a binfo.
      	(build_op_delete_call): Pass a binfo to
      	perform_or_defer_access_check.
      	* class.c (alter_access): Likewise.
      	* decl.c (make_typename_type): Likewise.
      	(make_unbound_class_template): Likewise.
      	* lex.c (do_identifier): Likewise.
      	* method.c (hack_identifier): Likewise.
      	* parser.c (cp_parser_lookup_name): Likewise.
      	* search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
      	test.
      	* semantics.c (finish_non_static_data_member): Likewise.
      	(perform_or_defer_access_check): Expect a binfo.
      	* typeck.c (comptypes): Expect types.
      
      	* mangle.c (find_substitution): Don't pass a non-type to same_type_p
      	* friend.c (make_friend_class): Likewise.
      	* pt.c (check_default_tmpl_args): Likewise.
      	(lookup_template_class): Likewise.
      
      From-SVN: r68424
      Nathan Sidwell committed
  7. 20 Jun, 2003 2 commits
    • tree.h (expand_function_end): Remove all parameters. · 1f9cc6db
      	* tree.h (expand_function_end): Remove all parameters.
      	* function.c (expand_function_end): Remove all parameters.
      	Use input_location. Never expand_end_bindings.
      	* c-decl.c (c_expand_body_1): Adjust expand_function_end call.
      	* coverage.c (create_coverage): Likewise.
      
      	* ada/utils.c (end_subprog_body): Adjust expand_function_end
      	call.
      
      	* cp/semantics.c (genrtl_finish_function): Adjust
      	expand_function_end call.
      
      	* f/com.c (finish_function): Adjust expand_function_end call.
      
      	* java/class.c (push_class): Use a location_t to save place.
      	(emit_register_classes): Set input_location. Adjust
      	expand_function_end call.
      	* java/resource.c (write_resource_constructor): Likewise.
      	* java/decl.c (end_java_method): Adjust expand_function_end call.
      	* java/parse.y (source_end_java_method): Likewise.
      
      	* treelang/treetree.c (tree_code_create_function_wrapup): Adjust
      	expand_function_end call.
      
      From-SVN: r68255
      Nathan Sidwell committed
    • re PR c++/9649 (ICE in finish_member_declaration at cp/semantics.c:1850 when… · f139561c
      re PR c++/9649 (ICE in finish_member_declaration at cp/semantics.c:1850 when redeclaring a static member variable)
      
      	PR c++/9649
      	* cp-tree.h (pushdecl_class_level): Change prototype.
      	(push_class_level_binding): Likewise.
      	* decl.c (add_binding): Reject duplicate static data members.
      	(pushdecl_class_level): Return a value indicating whether or not
      	the binding was valid.
      	(push_class_level_binding): Likewise.
      	* semantics.c (finish_member_declaration): Don't keep invalid
      	declarations.
      
      	PR c++/9649
      	* g++.dg/template/static4.C: New test.
      	* g++.old-deja/g++.other/anon7.C: Remove spurious error messages.
      
      From-SVN: r68240
      Mark Mitchell committed
  8. 19 Jun, 2003 1 commit
  9. 14 Jun, 2003 1 commit
    • tree.h (init_function_start): Remove filename and line paramters. · ee6b0296
      	* tree.h (init_function_start): Remove filename and line paramters.
      	* function.c (init_function_start): Remove filename and line
      	parameters. Use DECL_SOURCE_LOCATION.
      	* c-decl.c (store_parm_decls): Adjust init_function_start call.
      	(c_expand_body_1): Likewise.
      	* coverage.c (create_coverage): Likewise.
      
      	* ada/utils.c (begin_subprog_body): Adjust init_function_start
      	call.
      
      	* cp/decl.c (start_function): Adjust init_function_start call.
      	* cp/method.c (use_thunk): Likewise.
      	* cp/semantics.c (genrtl_start_function): Likewise.
      
      	* f/com.c (stor_parm_decls): Adjust init_function_start call.
      
      	* java/class.c (emit_register_classes): Adjust init_function_start
      	call.
      	* java/decl.c (complete_start_java_method): Likewise.
      	* java/resource.c (write_resource_constructor): Likewise.
      
      	* objc/objc-act.c (build_tmp_function_decl): Set line number to
      	zero.
      	(hack_method_prototype): Adjust init_function_start call.
      
      	* treelang/treetree.c (tree_code_create_function_initial): Adjust
      	init_function_start call.
      
      From-SVN: r67953
      Nathan Sidwell committed
  10. 12 Jun, 2003 1 commit
  11. 18 May, 2003 1 commit
  12. 15 May, 2003 1 commit
  13. 11 May, 2003 1 commit
    • PR c++/10230, c++/10481 · 9f01ded6
      	PR c++/10230, c++/10481
      	* semantics.c (finish_non_static_data_member): Handle when the
      	non-static member is not from a base of the current class type.
      
      	* g++.dg/lookup/scoped5.C: New test.
      
      From-SVN: r66683
      Kriang Lerdsuwanakij committed
  14. 10 May, 2003 2 commits
    • re PR c++/9252 ([New parser] Errors due to legally used "typename") · 78757caa
      	PR c++/9252
      	* cp-tree.h (saved_scope): Remove check_access field.
      	(tsubst_flags_t): Remove tf_parsing.
      	* decl.c (maybe_push_to_top_level): Don't initialize
      	scope_chain->check_access.
      	(make_typename_type, make_unbound_class_template): Don't use
      	tf_parsing.
      	(register_dtor_fn): Use push/pop_deferring_access_checks
      	instead of scope_chain->check_access.
      	* method.c (use_thunk): Likewise.
      	* parser.c (cp_parser_explicit_instantiation
      	(cp_parser_constructor_declarator_p): Don't call
      	push/pop_deferring_access_checks here.
      	(cp_parser_template_argument, cp_parser_class_name): Don't use
      	tf_parsing.
      	(yyparse): Check flag_access_control.
      	* pt.c (instantiate_class_template): Call
      	push/pop_deferring_access_checks.
      	* semantics.c (push_deferring_access_checks): Propagate
      	dk_no_check.
      	(perform_or_defer_access_check): Make sure basetype_path is
      	a type before comparison.
      	* call.c (build_op_delete_call, build_over_call): Use
      	perform_or_defer_access_check.
      	* class.c (alter_access): Likewise.
      	* init.c (build_offset_ref): Likewise.
      	* lex.c (do_identifier): Likewise.
      	* method.c (hack_identifier): Likewise.
      	* search.c (lookup_member): Likewise.
      	* semantics.c (finish_non_static_data_member): Likewise.
      	(simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
      	instead of flag_access_control.
      
      	* g++.dg/parse/access8.C: New test.
      	* g++.dg/parse/access9.C: New test.
      
      From-SVN: r66660
      Kriang Lerdsuwanakij committed
    • re PR c++/9554 (Out of class declaration of member class template specialisation rejected) · 8d241e0b
      	PR c++/9554
      	* parser.c (cp_parser_class_name): Remove check_access parameter.
      	All caller adjusted.  Update declaration.
      	(cp_parser_lookup_name): Likewise.
      	* semantics.c (push_deferring_access_checks): Change parameter type
      	to enum deferring_kind.  All caller adjusted.
      	(resume_deferring_access_checks): Adjust to use new enum.
      	(stop_deferring_access_checks): Likewise.
      	(perform_or_defer_access_check): Likewise.
      	* cp-tree.h (deferring_kind): New enum.
      	(deferred_access): Adjust field type.
      	(push_deferring_access_checks): Update declaration.
      
      	* g++.dg/parse/access1.C: New test.
      
      From-SVN: r66659
      Kriang Lerdsuwanakij committed
  15. 03 May, 2003 1 commit
    • class.c (finish_struct): Use location_t and input_location directly. · 82a98427
      	* class.c (finish_struct): Use location_t and input_location
      	directly.
      	* decl.c (make_label_decl): Likewise.
      	(use_label): Likewise.
      	* decl2.c (warn_if_unknown_interface): Likewise.
      	(start_static_initialization_or_destruction): Likewise.
      	(generate_ctor_or_dtor_function): Likewise.
      	(finish_file): Likewise.
      	* error.c (print_instantiation_full_context): Likewise.
      	* init.c (create_temporary_var): Likewise.
      	* method.c (synthesize_method): Likewise.
      	* parser.c (cp_token): Likewise.
      	(cp_lexer_set_source_position_from_token): Likewise.
      	(cp_lexer_get_preprocessor_token): Likewise.
      	(cp_parser_statement): Likewise.
      	* pt.c (tsubst_friend_function): Likewise.
      	(instantiate_class_template): Likewise.
      	(tsubst_decl): Likewise.
      	(tsubst): Likewise.
      	(instantiate_decl): Likewise.
      	* semantics.c (begin_class_definition): Likewise.
      	(expand_body): Likewise.
      
      From-SVN: r66423
      Nathan Sidwell committed
  16. 01 May, 2003 1 commit
    • input.h (lineno): Rename to ... · d479d37f
      	* input.h (lineno): Rename to ...
      	(input_line): ... here.
      	* tree.h (lineno): Rename to ...
      	(input_line): ... here.
      	* scan.h (lineno): Rename to ...
      	(input_line): ... here.
      	* toplev.c (lineno): Rename to ...
      	(input_line): ... here.
      	(push_srcloc, pop_srcloc):  Rename lineno to input_line.
      	* c-common.c (c_expand_start_cond, fname_decl): Likewise.
      	* c-decl.c (poplevel, pop_label_level, lookup_label, lookup_tag,
      	store_parm_decls, c_expand_body_1): Likewise.
      	* c-errors.c (pedwarn_c99): Likewise.
      	* c-format.c (status_warning): Likewise.
      	* c-lex.c (fe_file_change, cb_def_pragma, c_lex): Likewise.
      	* c-opts.c (c_common_post_options, c_common_parse_file): Likewise.
      	* c-parse.in (save_filename, maybe_type_qual, ifc): Likwise.
      	* c-semantics.c (finish_stmt_tree, build_stmt, emit_local_var,
      	gentrtl_goto_stmt, genrtl_expr_stmt_value, genrtl_decl_stmt,
      	genrtl_if_stmt, genrtl_while_stmt, genrtl_do_stmt,
      	genrtl_return_stmt, genrtl_for_stmt, build_break_stmt,
      	build_continue_stmt, genrtl_switch_stmt, genrtl_asm_stmt,
      	prep_stmt, find_reachable_label, expand_unreachable_stmt): Likewise.
      	* coverage.c (create_coverage): Likewise.
      	* diagnostic.c (pedwarn, sorry, error, fatal_error,
      	internal_error, warning, diagnostic_report_current_module,
      	inform): Likewise.
      	* expr.c (expand_expr): Likewise.
      	* integrate.c (expand_inline_function,
      	output_inline_function): Likewise.
      	* rtl-error.c (file_and_line_for_asm): Likewise.
      	* tree-inline.c (find_alloca_call, find_builtin_longjmp_call,
      	walk_tree): Likewise.
      	* tree.c (make_node): Likewise.
      	* ada, cp, f, java, objc, treelang: Likewise.
      
      	ada
      	* trans.c (build_unit_elab, set_lineno): Rename lineno to
      	input_line.
      	* utils.c (pushdecl, create_label_decl, begin_subprog_body,
      	end_subprog_body): Likewise.
      	* utils2.c (build_call_raise): Likewise.
      
      	cp
      	* class.c (finish_struct): Rename lineno to input_line.
      	* decl.c (push_binding_level, pop_binding_level,
      	suspend_binding_level, resume_binding_level, make_label_decl,
      	use_label, start_function): Likewise.
      	* decl2.c (warn_if_unknown_interface,
      	start_static_initialization_or_destruction,
      	generate_ctor_or_dtor_function, finish_file): Likewise.
      	* error.c (cp_line_of, print_instantiation_full_context,
      	print_instantiation_context): Likewise.
      	* except.c (check_handlers_1, check_handlers): Likewise.
      	* init.c (create_temporary_var): Likewise.
      	* method.c (use_thunk, synthesize_method): Likewise.
      	* parser.c (cp_lexer_set_source_position_from_token,
      	cp_lexer_get_preprocessor_token): Likewise.
      	* pt.c (push_tinst_level, pop_tinst_level,
      	tsubst_friend_function, instantiate_class_template, tsubst_decl,
      	tsubst, tsubst_expr, instantiate_decl): Likewise.
      	* semantics.c (genrtl_try_block, finish_label_stmt,
      	begin_class_definition, expand_body,
      	genrtl_finish_function): Likewise.
      	* tree.c (build_min_nt, build_min): Likewise.
      
      	f
      	* ansify.c (die_unless): Rename lineno to input_line.
      	* com.c (ffecom_subscript_check_, ffecom_do_entry_,
      	ffecom_gen_sfuncdef_, ffecom_start_progunit_,
      	ffecom_sym_transform_, ffecom_sym_transform_assign_,
      	bison_rule_pushlevel_, bison_rule_compstmt_, finish_function,
      	store_parm_decls): Likewise.
      	* intrin.c (ffeintrin_fulfill_generic): Likewise.
      	* lex.c (ffelex_hash_, ffelex_include_, ffelex_next_line_,
      	ffelex_file_fixed, ffelex_file_free): Likewise.
      	* std.c (ffestd_exec_end): Likewise.
      	* ste.c (ffeste_emit_line_note_, ffeste_start_block_,
      	ffeste_start_stmt_): Likewise.
      	* ste.h (ffeste_filelinenum, ffeste_set_line): Likewise.
      
      	java
      	* lex.h (lineno): Rename to ...
      	(input_line): ... here
      	* parse-scan.y (lineno): Rename to ...
      	(input_line): ... here.
      	(reset_report): Rename lineno to input_line.
      	* check-init.c (check_init): Likewise.
      	* class.c (push_class): Likewise.
      	* decl.c (complete_start_java_method, end_java_method): Likewise.
      	* expr.c (expand_byte_code): Likewise.
      	* jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
      	* jcf-write.c (generate_bytecode_insns): Likewise.
      	* lex.c (java_init_lex, java_allocate_new_line,
      	do_java_lex): Likewise.
      	* parse.h (YYNOT_TWICE): Likewise.
      	* parse.y (empty_statement, expression_statement,
      	java_pop_parser_context, java_parser_context_save_global,
      	yyerror, register_fields, method_header, safe_layout_class,
      	find_in_imports_on_demand, create_artificial_method,
      	source_end_java_method, start_complete_expand_method,
      	build_thisn_assign, java_complete_lhs,
      	maybe_absorb_scoping_block): Likewise.
      
      	objc
      	* objc-act.c (objc_init): Rename lineno to input_line.
      	(build_module_descriptor, build_selector_translation_table,
      	build_protocol_template, build_method_prototype_list_template,
      	build_category_template, build_selector_table,
      	build_class_template, build_super_template, build_ivar_template,
      	build_ivar_list_template, build_method_list_template,
      	build_method_template, add_instance_variable): Likewise.
      
      	treelang
      	* tree1.c (treelang_init): Rename lineno to input_line.
      
      From-SVN: r66333
      Nathan Sidwell committed
  17. 23 Apr, 2003 1 commit
  18. 13 Apr, 2003 1 commit
    • tree.c (build_constructor): New function. · dcf92453
      	* tree.c (build_constructor): New function.
      	* tree.h: Prototype it.
      
      	* c-typeck.c (build_c_cast, pop_init_level)
      	* profile.c (build_function_info_value, build_gcov_info_value)
      	(create_profiler):
      	Use build_constructor.
      
      	* builtins.c (expand_builtin_args_info): Remove #if 0 blocks.
      
      	* objc/objc-act.c (build_constructor):
      	Rename objc_build_constructor. Use build_constructor.
      	(build_objc_string_object, objc_add_static_instance)
      	(init_def_list, init_objc_symtab, init_module_descriptor)
      	(generate_static_references, build_selector_translation_table)
      	(build_descriptor_table_initializer, generate_descriptor_table)
      	(build_protocol_initializer, build_ivar_list_initializer)
      	(generate_ivars_list, build_dispatch_table_initializer)
      	(generate_dispatch_table, generate_protocol_list)
      	(build_category_initializer, build_shared_structure_initializer):
      	Update to match.
      
      ada:
      	* gigi.h, utils2.c (build_constructor):
      	Rename gnat_build_constructor. Use build_constructor.
      	* decl.c (gnat_to_gnu_entity)
      	* trans.c (tree_transform, pos_to_constructor, extract_values)
      	* ada/utils.c (build_template, convert_to_fat_pointer, convert)
      	(unchecked_convert)
      	* ada/utils2.c (build_binary_op, build_call_raise, build_allocator)
      	(fill_vms_descriptor):
      	Update to match.
      
      cp:
      	* class.c (initialize_array)
      	* decl.c (reshape_init)
      	* decl2.c (build_expr_from_tree)
      	* init.c (build_zero_init)
      	* pt.c (tsubst_copy, tsubst_copy_and_build)
      	* rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
      	(ptm_initializer, class_initializer, get_pseudo_ti_init)
      	* semantics.c (finish_compound_literal)
      	* typeck.c (build_ptrmemfunc1)
      	* typeck2.c (store_init_value, process_init_constructor)
      	(build_functional_cast): Use build_constructor.
      
      f:
      	* com.c (ffecom_build_complex_constant_, ffecom_expr_)
      	(ffecom_init_zero_, ffecom_transform_namelist_, ffecom_vardesc_)
      	(ffecom_vardesc_array_, ffecom_vardesc_dims_, ffecom_2)
      	* ste.c (ffeste_io_ialist_, ffeste_io_cilist_, ffeste_io_cllist_)
      	(ffeste_io_icilist_, ffeste_io_inlist_, ffeste_io_olist_):
      	Use build_constructor.
      
      java:
      	* class.c (make_field_value, make_method_value, get_dispatch_table)
      	(make_class_data, emit_offset_symbol_table)
      	* constants.c (build_constants_constructor)
      	* java-tree.h (START_RECORD_CONSTRUCTOR)
      	* parse.y (maybe_build_array_element_wfl):
      	Use build_constructor.
      
      From-SVN: r65539
      Zack Weinberg committed
  19. 08 Mar, 2003 1 commit
    • re PR c++/9823 (ICE in sort_mem_initializers) · 0e136342
      	PR c++/9823
      	* cp-tree.h (begin_mem_initializers): Remove.
      	* parser.c (cp_parser_mem_initializer_list): Inline it here.
      	Do not call finish_mem_initializers if not in a constructor.
      	(cp_parser_class_head): Fix typo in error message.
      	* semantics.c (begin_mem_initializers): Remove.
      	* testsuite/g++.dg/parser/constructor1.C: New test.
      
      	PR c++/9823
      	* g++.dg/parser/constructor1.C: New test.
      
      From-SVN: r63999
      Mark Mitchell committed
  20. 20 Feb, 2003 1 commit
    • Change base class access representation. · dbbf88d1
      	* tree.h (TREE_VIA_PUBLIC, TREE_VIA_PROTECTED,
      	TREE_VIA_PRIVATE): Remove.
      	(BINFO_BASEACCESSES): New binfo elt.
      	(BINFO_BASEACCESS): New accessor.
      	(BINFO_ELTS): Increase.
      	(TI_ACCESS_PUBLIC, TI_ACCESS_PROTECTED, TI_ACCESS_PRIVATE): New.
      	(access_public_node, access_protected_node,
      	access_private_node): New global nodes.
      	* tree.c (build_common_tree_nodes_2): Initialize access nodes.
      	* dbxout.c (dbxout_type): Adjust.
      	* dwarf2out.c (gen_inheritance_die): Add access parameter.
      	(gen_member_die): Adjust.
      	* dwarfout.c (output_inheritance_die): ARG is array of two trees.
      	(output_type): Adjust.
      	* tree-dump.c (dequeue_and_dump): Adjust binfo dumping.
      
      	Change base class access representation. Share virtual base
      	binfos.
      	* cp/call.c (build_special_member_call): Remove binfo_for_vbase
      	call.
      	* cp/class.c (build_base_path): Likewise.
      	(build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
      	(build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
      	(make_new_vtable): Adjust.
      	(force_canonical_binfo_r): Delete.
      	(force_canonical_binfo): Delete.
      	(mark_primary_virtual_base): Delete.
      	(dfs_unshared_virtual_bases): Delete.
      	(mark_primary_bases): Adjust.
      	(maybe_warn_about_overly_private_class): Adjust.
      	(dfs_base_derived_from): Delete.
      	(base_derived_from): Follow the inheritance chain.
      	(struct find_final_overrider_data): Add vpath member.
      	(dfs_find_final_overrider): Adjust.
      	(dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
      	(find_final_overrider): Adjust.
      	(update_vtable_entry_for_fn): Adjust.
      	(modify_all_vtables): Adjust.
      	(walk_subobject_offsets): Adjust.
      	(layout_nonempty_base_or_field): Adjust.
      	(layout_empty_base): Remove last parameter. Adjust.
      	(build_base_field): Adjust.
      	(build_base_fields): Adjust.
      	(propagate_binfo_offsets): Remove last parameter. Adjust.
      	(dfs_set_offset_for_unshared_vbases): Delete.
      	(layout_virtual_bases): Adjust.
      	(finish_struct_1): Adjust.
      	(init_class_processing): Don't init access nodes.
      	(dfs_get_primary_binfo): Delete.
      	(get_primary_binfo): Adjust.
      	(dump_class_hierarchy_r): Remove most derived arg, add IGO
      	parameter. Adjust.
      	(dump_class_hierarchy): Adjust.
      	(finish_vtbls): Adjust.
      	(get_original_base): Delete.
      	(build_vtt_inits): Adjust.
      	(dfs_build_secondary_vptr_vtt_inits): Adjust.
      	(dfs_ctor_vtable_bases_queue_p): Adjust.
      	(build_ctor_vtbl_group): Adjust.
      	(dfs_accumulate_vtbl_inits): Adjust.
      	(build_vtbl_initializer): Adjust.
      	(build_vbase_offset_vtbl_entries): Adjust.
      	(add_vcall_offset_vtbl_entries_1): Adjust.
      	* cp/cp-tree.h (CPTI_ACCESS_*): Remove.
      	(access_*_node): Remove.
      	(CANONICAL_BINFO): Delete.
      	(BINFO_UNSHARED_MARKED): Remove.
      	(BINFO_MARKED): Set LANG_FLAG_0 directly.
      	(SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
      	(BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
      	(SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
      	Delete.
      	(BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
      	(SET_BINFO_NEW_VTABLE_MARKED): Adjust.
      	(SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
      	Delete.
      	(BINFO_DEPENDENT_BASE_P): New.
      	(dfs_walk, dfs_walk_real): Queue function takes derived binfo and
      	index.
      	(markedp, unmarkedp): Adjust.
      	(dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
      	dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
      	find_vbase_instance, binfo_for_vbase): Delete.
      	(copied_binfo, original_binfo): Declare.
      	(finish_base_specifier): Add virtual_p arg.
      	(unshare_base_binfos): Delete.
      	(copy_base_binfos): Declare.
      	(reverse_path): Delete.
      	* cp/decl.c (xref_basetypes): Access and virtuality passed
      	differently. Don't copy direct base binfos here. Call
      	copy_base_binfos.
      	* cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
      	(initialize_vtbl_ptrs): Adjust.
      	(expand_member_init): Adjust.
      	* cp/parser.c (cp_parser_base_specifier): Adjust.
      	* cp/pt.c (instantiate_class_template): Adjust.
      	(get_template_base_recursive): Adjust.
      	* cp/rtti.c (get_pseudo_ti_init): Adjust.
      	(get_pseudo_ti_desc): Adjust.
      	* cp/tree.c (unshare_base_binfos): Rename to ...
      	(copy_base_binfos): ... here, reimplement.
      	(make_binfo): Set BINFO_DEPENDENT_BASE_P.
      	(reverse_path): Remove.
      	* cp/typeck.c (get_delta_difference): Adjust error messages.
      	* cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
      	* cp/search.c (lookup_base_r): Adjust.
      	(dynamic_cast_base_recurse): Adjust.
      	(canonical_binfo): Remove.
      	(dfs_canonical_queue): Remove.
      	(dfs_assert_unmarked_p): Remove.
      	(assert_canonical_unmarked): Remove.
      	(shared_marked_p, shared_unmarked_p): Remove.
      	(BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
      	(dfs_access_in_type): Adjust.
      	(access_in_type): Adjust.
      	(dfs_accessible_queue_p): Adjust.
      	(dfs_accessible_p): Adjust.
      	(is_subobject_of_p_1, is_subobject_of_p): Remove.
      	(struct lookup_field_info): Remove from_dep_base_p field.
      	(lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
      	(lookup_field_r): Remove dependent base code.
      	(lookup_member): Likewise.
      	(dfs_walk, dfs_walk_real): Add access arg to queue fn.
      	(dfs_unmarked_real_bases_queue_p): Remove.
      	(dfs_marked_real_bases_queue_p): Remove.
      	(dfs_skip_vbases): Remove.
      	(dfs_get_pure_virtuals): Adjust.
      	(markedp, unmarkedp): Adjust.
      	(marked_vtable_pathp, unmarked_vtable_pathp): Remove.
      	(marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
      	(dfs_unmark): Adjust.
      	(dfs_get_vbase_types):Remove.
      	(dfs_build_inheritance_graph_order): Remove.
      	(get_vbase_types): Remove
      	(dfs_find_vbase_instance): Remove.
      	(find_vbase_instance): Remove.
      	(dfs_debug_unmarkedp): Adjust.
      	(dependent_base_p): Remove.
      	(dfs_push_type_decls): Adjust.
      	(dfs_push_decls): Adjust.
      	(dfs_no_overlap_yet): Adjust.
      	(copied_binfo): New function.
      	(original_binfo): New function.
      	(binfo_for_vbase): Remove.
      
      	Change base class access representation.
      	* java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
      	(add_interface_do): Likewise.
      
      From-SVN: r63172
      Nathan Sidwell committed
  21. 30 Jan, 2003 1 commit
    • c-common.c (builtin_define_float_constants): Define __<TYPE>_HAS_INFINITY__ and… · 14d22dd6
      c-common.c (builtin_define_float_constants): Define __<TYPE>_HAS_INFINITY__ and __<TYPE>_HAS_QUIET_NAN__.
      
      	* c-common.c (builtin_define_float_constants): Define
      	__<TYPE>_HAS_INFINITY__ and __<TYPE>_HAS_QUIET_NAN__.
      
      	* call.c (build_field_call): Use build_new_op, not build_opfncall.
      	(prep_operand): New function.
      	(build_new_op): Use it.  Remove dead code.
      	* class.c (pushclass): Change "modify" parameter type from int to
      	bool.
      	(currently_open_class): Use same_type_p, not pointer equality.
      	(push_nested_class): Adjust calls to pushclass, remove modify
      	parameter.
      	* cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
      	(pushclass): Change prototype.
      	(push_nested_class): Likewise.
      	(grokoptypename): Remove.
      	(build_opfncall): Remove.
      	(value_dependent_expression_p): Declare.
      	(resolve_typename_type): Likewise.
      	(resolve_typename_type_in_current_instantiation): Likewise.
      	(enter_scope_of): Remove.
      	(tsubst): Remove.
      	(tsubst_expr): Likewise.
      	(tsubst_copy): Likewise.
      	(tsubst_copy_and_build): Likewise.
      	* decl.c (warn_about_implicit_typename_lookup): Remove.
      	(finish_case_label): Return error_mark_node for erroneous labels.
      	(start_decl): Adjust calls to push_nested_class.
      	(grokfndecl): Call push_scope/pop_scope around call to
      	duplicate_decls.
      	(grokdeclarator): Do not call tsubst.
      	(start_function): Adjust calls to push_nested_class.
      	* decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
      	(check_classfn): Use push_scope/pop_scope around type comparisions.
      	(grokoptypename): Remove.
      	(push_sscope): Adjust call to push_nested_class.
      	* error.c (dump_type): Show cv-qualification of typename types.
      	* init.c (build_member_call): Use build_new_op, not
      	build_opfncall.
      	* method.c (build_opfncall): Remove.
      	* parser.c (cp_parser): Add allow_non_constant_expression_p and
      	non_constant_expression_p.
      	(cp_parser_constant_expression): Adjust prototype.
      	(cp_parser_resolve_typename_type): Remove.
      	(cp_parser_non_constant_expression): New function.
      	(cp_parser_non_constant_id_expression): Likewise.
      	(cp_parser_new): Set allow_non_constant_expression_p and
      	non_constant_expression_p.
      	(cp_parser_primary_expression): Reject `this' and `va_arg' in
      	constant-expressions.  Note that dependent names aren't really
      	constant.
      	(cp_parser_postfix_expression): Reject conversions to non-integral
      	types in constant-expressions.  Neither are increments or
      	decrements.
      	(cp_parser_unary_expression): Reject increments and decrements in
      	constant-expressions.
      	(cp_parser_direct_new_declarator): Adjust call to
      	cp_parser_constant_expression.
      	(cp_parser_cast_expression): Reject conversions to non-integral
      	types in constant-expressions.
      	(cp_parser_assignment_expression): Rejects assignments in
      	constant-expressions.
      	(cp_parser_expression): Reject commas in constant-expressions.
      	(cp_parser_labeled_statement): Adjust call to
      	cp_parser_constant_expression.
      	(cp_parser_direct_declarator): Simplify array bounds, even in
      	templates, when they are non-dependent.  Use
      	resolve_typename_type, not cp_parser_resolve_typename_type.
      	(cp_parser_class_head): Use resolve_typename_type, not
      	cp_parser_resolve_typename_type.
      	(cp_parser_member_declaration): Adjust call to
      	cp_parser_constant_expression.
      	(cp_parser_constant_initializer): Likewise.
      	(cp_parser_constructor_declarator): Use resolve_typename_type, not
      	cp_parser_resolve_typename_type.
      	(cp_parser_late_parsing_default_args): Adjust call to
      	push_nested_class.
      	* pt.c (tsubst): Give it internal linkage.
      	(tsubst_expr): Likewise.
      	(tsubst_copy): Likewise.
      	(tsubst_copy_and_build): Likewise.
      	(push_access_scope_real): Likewise.
      	(tsubst_friend_class): Likewise.
      	(instantiate_class_template): Adjust call to pushclass.
      	(value_dependent_expression_p): Give it external linkage.
      	Robustify.
      	(resolve_typename_type): New function.
      	* semantics.c (finish_call_expr): Use build_new_op, not
      	build_opfncall.
      	(begin_constructor_declarator): Remove.
      	(begin_class_definition): Adjust call to pushclass.
      	(enter_scope_of): Remove.
      	* typeck.c (comptypes): Resolve typename types as appropriate.
      	(build_x_indirect_ref): Use build_new_op, not build_opfncall.
      	(build_x_compound_expr): Likewise.
      	(build_modify_expr): Likewise.
      	(build_x_modify_expr): Likewise.
      	* typeck2.c (build_x_arrow): Likewise.
      
      	* g++.dg/parser/constant1.C: New test.
      
      	* include/std/std_limits.h (numeric_limits<float>::has_infinity):
      	Use __FLT_HAS_INIFINITY__ to initialize.
      	(numeric_limits<float>::has_quiet_NaN): Likewise.
      	(numeric_limits<double>::has_infinity): Use __DBL_HAS_INIFINITY__
      	to initialize.
      	(numeric_limits<double>::has_quiet_NaN): Likewise.
      	(numeric_limits<long double>::has_infinity): Use
      	__LDBL_HAS_INIFINITY__ to initialize.
      	(numeric_limits<long_double>::has_quiet_NaN): Likewise.
      
      From-SVN: r62130
      Mark Mitchell committed
  22. 25 Jan, 2003 1 commit
    • re PR c++/9403 (parse error on template keyword used for disambiguation) · bbaab916
      cp:
      	PR c++/9403
      	* parser.c (cp_parser_class_or_namespace_name): Reject duplicate
      	template keyword.
      	(cp_parser_base_specifier): Look for and consume a
      	TEMPLATE keyword. Replace switch with array index.
      
      	PR c++/795
      	* semantics.c (finish_non_static_data_member): Remember the
      	field's type even in a template.
      
      	PR c++/9415
      	* pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
      	already scoped.
      
      	PR c++/8545
      	* parser.c (cp_parser_cast_expression): Be more tentative.
      testsuite:
      	PR c++/9403
      	* g++.dg/parse/template3.C: New test.
      	* g++.old-deja/g++.pt/memclass5.C: Add needed template keyword.
      
      	PR c++/795
      	* g++.dg/parse/template4.C: New test.
      
      	PR c++/9415
      	* g++.dg/template/qual2.C: New test.
      
      	PR c++/8545
      	* g++.old-deja/g++.brendan/parse3.C: Remove XFAIL.
      
      	* g++.old-deja/g++.ns/bogus1.C: Change expected error.
      
      From-SVN: r61791
      Nathan Sidwell committed
  23. 23 Jan, 2003 1 commit
  24. 16 Jan, 2003 1 commit
    • cp-tree.h (lang_type_class): Remove is_partial_instantiation. · 8fbc5ae7
      	* cp-tree.h (lang_type_class): Remove is_partial_instantiation.
      	(PARTIAL_INSTANTIATION_P): Remove.
      	(IMPLICIT_TYPENAME_P): Likewise.
      	(IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
      	(build_typename_type): Remove declaration.
      	(parmlist_is_exprlist): Likewise.
      	* decl.c (build_typename_type): Make it static, remove third
      	parameter.
      	(push_class_binding): Don't do implicit typename stuff.
      	(make_typename_type): Likewise.
      	(lookup_name_real): Likewise.
      	(grokdeclarator): Don't try to convert declarations into
      	initializations.  Don't do implicit typename stuff.
      	(parmlist_is_exprlist): Remove.
      	(xref_basetypes): Simplify.
      	* decl2.c (grokfield): Don't try to convert declarations into
      	initializations.
      	(build_anon_union_vars): Do this while processing templates, too.
      	(finish_anon_union): Likewise.
      	* error.c (dump_type): Remove implicit typename handling.
      	* parser.c (cp_parser_diagnose_invalid_type_name): New method.
      	(cp_parser_primary_expression): Correct handling of names not
      	found by unqualified name lookup in templates.
      	(cp_parser_nested_name_specifier_opt): Avoid checking dependency
      	of types when possible.
      	(cp_parser_simple_declaration): Complain intelligently about some
      	invalid declarations.
      	(cp_parser_member_declaration): Likewise.
      	(cp_parser_constructor_declarator_p): Don't check when we're in a
      	function scope.
      	* pt.c (instantiate_class_template): Remove
      	PARTIAL_INSTANTIATION_P gunk.
      	* search.c (lookup_field_r): Don't build implicit typenames.
      	(marked_pushdecls_p): Don't enter dependent base types.
      	(unmarked_pushdecls_p): Likewise.
      	* semantics.c (begin_class_definition): Remove implicit typename
      	stuff.
      
      	* config/locale/gnu/messages_members.h: Use this-> to refer to
      	unqualified members of base clasess.
      	* config/locale/ieee_1003.1-2001/codecvt_specializations.h: Likewise.
      	* include/bits/codecvt.h: Likewise.
      	* include/bits/deque.tcc: Likewise.
      	* include/bits/fstream.tcc: Likewise.
      	* include/bits/istream.tcc: Likewise.
      	* include/bits/list.tcc: Likewise.
      	* include/bits/locale_facets.h: Likewise.
      	* include/bits/ostream.tcc: Likewise.
      	* include/bits/sstream.tcc: Likewise.
      	* include/bits/stl_bvector.h: Likewise.
      	* include/bits/stl_deque.h: Likewise.
      	* include/bits/stl_list.h: Likewise.
      	* include/bits/stl_tree.h: Likewise.
      	* include/bits/stl_vector.h: Likewise.
      	* include/bits/vector.tcc: Likewise.
      	* include/ext/ropeimpl.h: Likewise.
      	* include/ext/stdio_filebuf.h: Likewise.
      	* include/ext/stl_rope.h: Likewise.
      	* include/std/std_fstream.h: Likewise.
      	* include/std/std_sstream.h: Likewise.
      
      Co-Authored-By: Jeffrey Oldham <oldham@codesourcery.com>
      
      From-SVN: r61403
      Mark Mitchell committed
  25. 14 Jan, 2003 1 commit
    • config-lang.in: Add semantics.c to gtfiles. · cf22909c
      	* config-lang.in: Add semantics.c to gtfiles.
      	* cp-tree.h (flagged_type_tree_s): Remove lookups field.
      	(saved_scope): Likewise.
      	(type_lookups): Remove.
      	(deferred_access): New structure.
      	(type_access_control): Remove.
      	(save_type_access_control): Likewise.
      	(reset_type_access_control): Likewise.
      	(decl_type_access_control): Likewise.
      	(push_deferring_access_checks): Declare.
      	(resume_deferring_access_checks): Likewise.
      	(stop_deferring_access_checks): Likewise.
      	(pop_deferring_access_checks): Likewise.
      	(get_deferred_access_checks): Likewise.
      	(pop_to_parent_deferring_access_checks): Likewise.
      	(perform_deferred_access_checks): Likewise.
      	(perform_or_defer_access_check): Likewise.
      	* decl.c (make_typename_type): Use perform_or_defer_access_check.
      	(make_unbound_class_template): Likewise.
      	(grokdeclarator): Don't call decl_type_access_control.
      	* parser.c (cp_parser_context): Remove deferred_access_checks
      	and deferring_access_checks_p fields.
      	(cp_parser_context_new): Adjust.
      	(cp_parser): Remove access_checks_lists.
      	(cp_parser_defer_access_check): Remove.
      	(cp_parser_start_deferring_access_checks): Remove.
      	(cp_parser_stop_deferring_access_checks): Remove.
      	(cp_parser_perform_deferred_access_checks): Remove.
      	(cp_parser_nested_name_specifier_opt): Use new deferred access
      	functions.
      	(cp_parser_simple_declaration): Likewise.
      	(cp_parser_template_id): Likewise.
      	(cp_parser_function_definition): Likewise.
      	(cp_parser_class_specifier): Likewise.
      	(cp_parser_lookup_name): Likewise.
      	(cp_parser_single_declaration): Likewise.
      	(cp_parser_pre_parsed_nested_name_specifier): Likewise.
      	(cp_parser_parse_tentatively): Likewise.
      	(cp_parser_parse_definitely): Likewise.
      	(yyparse): Likewise.
      	(cp_parser_init_declarator): Remove access_checks parameter.
      	Use new deferred access functions.
      	(cp_parser_function_definition_from_specifiers_and_declarator):
      	Likewise.
      	(cp_parser_class_head): Remove deferring_access_checks_p and
      	saved_access_checks parameters.  Use new deferred access functions.
      	(cp_parser_member_specification_opt): Don't call
      	reset_type_access_control.
      	* search.c (type_access_control): Remove.
      	* semantics.c: Include "gt-cp-semantics.h".
      	(deferred_type_access_control): Remove.
      	(deferred_access_stack): New variable.
      	(deferred_access_free_list): Likewise.
      	(push_deferring_access_checks): New function.
      	(resume_deferring_access_checks): Likewise.
      	(stop_deferring_access_checks): Likewise.
      	(pop_deferring_access_checks): Likewise.
      	(get_deferred_access_checks): Likewise.
      	(pop_to_parent_deferring_access_checks): Likewise.
      	(perform_deferred_access_checks): New function, adapted from
      	cp_parser_perform_deferred_access_checks.
      	(perform_or_defer_access_check): New function, adapted from
      	cp_parser_defer_access_check.
      	(current_type_lookups): Remove.
      	(deferred_type_access_control): Likewise.
      	(decl_type_access_control): Likewise.
      	(save_type_access_control): Likewise.
      	(reset_type_access_control): Likewise.
      	(begin_function_definition): Adjust.
      	(begin_class_definiton): Likewise.
      
      From-SVN: r61283
      Kriang Lerdsuwanakij committed
  26. 10 Jan, 2003 1 commit
  27. 01 Jan, 2003 1 commit
    • call.c, [...]: Replace "GNU CC" with "GCC" in the copyright header. · f5adbb8d
      	* call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
      	  except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
      	  lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
      	  pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
      	  typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
      	  copyright header.
      	* lex.h: parse.y is dead, so don't mention it.  Also replace the
      	  copyright header with the default GNU copyright header.
      
      From-SVN: r60738
      Steven Bosscher committed
  28. 31 Dec, 2002 1 commit
    • cp-tree.def (RETURN_INIT): Remove. · 92bc1323
      	* cp-tree.def (RETURN_INIT): Remove.
      	* cp-tree.h (DECL_IN_MEMORY_P): Remove.
      	(scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
      	(note_level_for_for): Remove.
      	(note_level_for_try): Likewise.
      	(note_level_for_catch): Likewise.
      	(finish_named_return_value): Likewise.
      	(do_pushlevel): Change prototype.
      	(pending_lang_change): Remove.
      	* decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
      	sk_for.
      	(note_level_for_for): Remove.
      	(note_level_for_try): Likewise.
      	(note_level_for_catch): Likewise.
      	(maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
      	* parser.c (cp_parser_context_free_list): Make it "deletable".
      	(cp_parser_template_argument): Remove misleading comment.
      	* pt.c (tsubst_expr): Remove RETURN_INIT code.
      	* semantics.c (genrtl_named_return_value): Remove.
      	(do_pushlevel): Take a scope kind as an argument.
      	(begin_if_stmt): Adjust.
      	(begin_while_stmt): Likewise.
      	(begin_for_stmt): Likewise.
      	(finish_for_init_stmt): Likewise.
      	(begin_switch_stmt): Likewise.
      	(begin_handler): Likewise.
      	(begin_compound_stmt): Likewise.
      	(finish_named_return_value): Remove.
      	(cp_expand_stmt): Remove RETURN_INIT case.
      	* tree.c (cp_statement_code_p): Remove RETURN_INIT case.
      
      	* g++.dg/init/array9.C: New test.
      
      From-SVN: r60707
      Mark Mitchell committed
  29. 30 Dec, 2002 1 commit
    • parse.y: Remove. · afd9b9dd
      	* parse.y: Remove.
      	* spew.c: Likewise.
      	* Make-lang.in (gt-cp-spew.h): Remove.
      	* cp-tree.h (do_pending_lang_change): Remove.
      	(do_identifier): Change prototype.
      	(finish_id_expr): Remove.
      	* decl.c (lookup_name_real): Remove yylex variable.
      	* decl2.c (build_expr_from_tree): Adjust call to do_identifier.
      	* lex.c (init_cpp_parse): Remove.
      	(reduce_cmp): Likewise.
      	(token_cmp): Likewise.
      	(yychar): Likewise.
      	(lastiddecl): Likewise.
      	(token_count): Likewise.
      	(reduce_count): Likewise.
      	(yyhook): Likewise.
      	(print_parse_statistics): Likewise.
      	(do_pending_lang_change): Likewise.
      	(do_identifier): Remove parsing parameter.
      	* lex.h (lastiddecl): Remove.
      	(looking_for_typename): Remove.
      	(looking_for_template): Likewise.
      	(pending_lang_change): Likewise.
      	(yylex): Likewise.
      	* semantics.c (finish_id_expr): Remove.
      
      From-SVN: r60642
      Mark Mitchell committed
  30. 28 Dec, 2002 2 commits
    • Remove traditional C constructs 3/n. · b746c5dc
      	* cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
      	build_up_reference, warn_ref_binding, convert_to_reference,
      	convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
      	convert_to_void, convert, convert_force, build_type_conversion,
      	build_expr_type_conversion, type_promotes_to,
      	perform_qualification_conversions): Use C90 prototyping style.
      	* decl2.c (grok_array_decl): Use boolean constant.
      	(delete_sanity): Likewise.
      	* typeck.c (build_unary_op): Likewise.
      	* semantics.c (finish_switch_cond): Likewise.
      	* parser.c (cp_parser_direct_new_declarator): Likewise.
      	* init.c (build_new): Likewise.
      
      From-SVN: r60574
      Gabriel Dos Reis committed
    • Make-lang.in (po-generated): Remove parse.c. · a723baf1
      	* Make-lang.in (po-generated): Remove parse.c.
      	(CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
      	($(srcdir)/cp/parse.h): Remove target.
      	($(srcdir)/cp/parse.c): Likewise.
      	(gt-cp-parse.h): Likewise.
      	(gt-cp-parser.h): New target.
      	(c++.distclean): Do not remove parse.output.
      	(c++.maintainer-clean): Do not remove parse.c or parse.h.
      	(cp/spew.o): Remove target.
      	(cp/lex.o): Adjust dependencies.
      	(cp/pt.o): Likewise.
      	(cp/parse.o): Likewise.
      	(cp/TAGS): Do not mention parse.c.
      	(cp/parser.o): New target.
      	* NEWS: Mention the new parser.
      	* call.c (build_scoped_method_call): Simplify.
      	(build_method_call): Likewise.
      	(build_new_function_call): Adjust calls to add_function_candidate
      	and add_template_candidate.
      	(build_new_op): Improve handling of erroroneous operands.
      	(convert_default_arg): Remove circular argument processing.
      	(name_as_c_string): New function.
      	(build_new_method_call): Use it.
      	(perform_implicit_conversion): Use error_operand_p.
      	* class.c (finish_struct_anon): Use constructor_name_p.
      	(check_field_decls): Likewise.
      	(pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
      	(resolve_address_of_overloaded_function): Likewise.
      	(instantiate_type): Tweak pointer-to-member handling.
      	(get_primary_binfo): Remove incorrect assertion.
      	* config-lang.in (gtfiles): Add parser.c, remove parse.c.
      	* cp-tree.h (DEFARG_TOKENS): New macro.
      	(default_arg): New structure.
      	(cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
      	(lang_tree_node): Add default_arg.
      	(cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
      	(type_info_ref_type): New macro.
      	(saved_scope): Make processing_explicit_instantiation a boolean.
      	(check_access): New field.
      	(unparsed_text): Remove.
      	(language_function): Remove unparsed_inlines.
      	(error_operand_p): New macro.
      	(lang_decl): Adjust pending_inline_info.
      	(DEFARG_POINTER): Remove.
      	(tag_types): Add typenames.
      	(lookup_ualified_name): Declare.
      	(lookup_name_real): Likewise.
      	(shadow_tag): Adjust prototype.
      	(get_scope_of_declarator): Declare it.
      	(process_next_inline): Remove it.
      	(check_for_missing_semicolon): Likewise.
      	(maybe_get_template_decl_from_type_decl): Declare it.
      	(finish_label_stmt): Adjust prototype.
      	(finish_non_static_data_meber): Declare it.
      	(finish_pseudo_destructor_call_expr): Rename to ...
      	(finish_pseudo_destructor_expr): ... this.
      	(finish_compound_literal): Declare it.
      	(begin_inline_definitions): Remove it.
      	(init_spew): Remove.
      	(peekyylex): Likewise.
      	(arbitrate_lookup): Likewise.
      	(frob_opname): Likewise.
      	(maybe_snarf_defarg): Likewise.
      	(add_defarg_fn): Likewise.
      	(do_pending_defargs): Likewise.
      	(done_pending_defargs): Likewise.
      	(unprocessed_defarg_fn): Likewise.
      	(replace_defarg): Likewise.
      	(end_input): Likewise.
      	(get_overloaded_fn): Likewise.
      	* cvt.c (convert_to_reference): Improve error handling.
      	* decl.c (lookup_name_real): Do not declare it static.
      	(maybe_push_to_top_level): Set check_access.
      	(identifier_type_value): Adjust call to lookup_name_real.
      	(lookup_qualified_name): New method.
      	(lookup_name_real): Remove special-case parsing code.
      	(lookup_name-nonclass): Adjust call to lookup_name_real.
      	(lookup_name_namespace_only): Likewise.
      	(lookup_name): Likewise.
      	(check_tag_decl): Return the type declared.
      	(shadow_tag): Likewise.
      	(register_dtor_fn): Tweak check_access.
      	(grokfndecl): Use constructor_name_p.
      	(get_scope_of_declarator): New function.
      	(grokdeclarator): Obscure tweaks for slightly different declarator
      	representations.
      	(start_method): Return error_mark_node to indicate failure.
      	(cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
      	* decl2.c (constructor_name_full): Simplify.
      	(constructor_name): Use it.
      	(build_expr_from_tree): Adjust for changes to do new parser.
      	(push_scope): Improve robustness.
      	(validate_nonmember_using_decl): Process declarations, not names.
      	(do_class_using_decl): Likewise.
      	(handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
      	here.
      	* error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
      	* expr.c (cxx_expand_expr): Handle BASELINKs.
      	* init.c (member_init_ok_or_else): Issue more errors.
      	(build_offset_ref): Tweak handling of FUNCTION_DECLs.
      	* lex.c: Do not include parse.h.
      	(yypring): Do not declare.
      	(yylval): Likewise.
      	(make_reference_declarator): Remove error-generating code.
      	(rid_to_yy): Remove.
      	(cxx_init): Do not call init_spew.
      	(yypring): Remove.
      	(check_for_missing_semicolon): Remove.
      	* lex.h (got_scope): Remove.
      	(got_object): Remove.
      	* method.c (hack_identifier): Use finish_non_static_data_member.
      	(implicitly_declare_fn): Adjust use of constructor_name.
      	* parser.c: New file.
      	* pt.c (parse.h): Do not include it.
      	(maybe_get_template_decl_from_template): Do not declare it.
      	(finish_member_template_decl): Tweak.
      	(begin_explicit_instantiation): Adjust for
      	processing_explicit_instantiation being boolean.
      	(end_explicit_instantiation): Likewise.
      	(maybe_process_partial_specialization): Tighten specialization
      	test.
      	(retrieve_local_specialization): Adjust ue of hash table.
      	(eq_local_specializations): New function.
      	(register_local_specialization): Likewise.
      	(push_template_decl_real): Remove unnecessary test.
      	(maybe_get_template_decl_from_type_decl): Don't make it static.
      	(for_each_template_parm_r): Handle TYPEOF_TYPE.
      	(tsubst_copy): Use retrieive_local_specialization to handle
      	PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
      	Handle COMPONENT_REFs with pseudo-destructor-expressions.
      	Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
      	(tsubst_expr): Pass decls, not names, to do_local_using_decl.
      	(unify): Tweak handling of CONST_DECLs.
      	(regenerate_decl_from_template): Use push_nested_class.
      	(template_for_substitution): New funciton.
      	(instantiate_decl): Use it.  Register parameters as local
      	specializations.
      	* rtti.c (init_rtti_processing): Set type_info_ref_type.
      	(build_typeid): Use it.
      	(get_typeid): Likeise.
      	* search.c (accessible_p): Use check_access, not
      	flag_access_control.
      	(adjust_result_of_qualified_name_lookup): Pay attention to the
      	context_class.
      	* semantics.c (finish_asm_stmt): Adjust error handling.
      	(finish_label_stmt): Return the statement.
      	(finish_non_static_data_member): New function.
      	(finish_class_expr): Handle BASELINKs.
      	(finish_call_expr): Handle PSEUDO_DTOR_EXPR.
      	(finish_object_call_expr): Simplify handling during templates.
      	(finish_pseudo_destructor_call_expr): Rename to ...
      	(finish_pseudo_dtor_expr): ... this.
      	(finish_compound_literal): New function.
      	(begin_inline_definitions): Remove.
      	(finish_sizeof): Remove special template handling.
      	* spew.c: Do not include parse.h.
      	* tree.c (get_overloaded_fn): Remove.
      	* typeck.c (build_class_member_access_expr): Handle
      	PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
      	(lookup_destructor): New function.
      	(finish_class_member_access_expr): Use it.
      	(convert_arguments): Simplify.
      	(build_unary_op): Handle BASELINKs.
      
      From-SVN: r60560
      Mark Mitchell committed
  31. 18 Dec, 2002 1 commit
  32. 17 Dec, 2002 2 commits
  33. 16 Dec, 2002 1 commit
  34. 30 Oct, 2002 1 commit
    • Core issue 287, PR c++/7639 · 7088fca9
      	Core issue 287, PR c++/7639
      	* cp-tree.h (lang_type_class): Add decl_list field.
      	(CLASSTYPE_DECL_LIST): New macro.
      	(maybe_add_class_template_decl_list): Add declaration.
      	* class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
      	(unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
      	(maybe_add_class_template_decl_list): New function.
      	(add_implicitly_declared_members): Use it.
      	* decl.c (maybe_process_template_type_declaration): Likewise.
      	(pushtag): Likewise.
      	* friend.c (add_friend): Likewise.
      	(make_friend_class): Likewise.
      	* semantics.c (finish_member_declaration): Likewise.
      	(begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
      	* pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
      	to process members and friends in the order of declaration.
      
      	Core issue 287, PR c++/7639
      	* g++.dg/template/instantiate1.C: Adjust error location.
      	* g++.dg/template/instantiate3.C: New test.
      	* g++.old-deja/g++.pt/crash10.C: Adjust error location.
      	* g++.old-deja/g++.pt/derived3.C: Adjust error location.
      	* g++.old-deja/g++.pt/spec28.C: Reorder declaration.
      
      From-SVN: r58654
      Kriang Lerdsuwanakij committed
  35. 25 Oct, 2002 1 commit
    • class.c (build_vtbl_initializer): Don't use build_vtable_entry. · bb5e8a7f
      	* class.c (build_vtbl_initializer): Don't use build_vtable_entry.
      	(build_vtable_entry): Remove.
      	* cp-tree.h (BINFO_VIRTUALS): Expand documentation.
      	(lang_decl): Add thunks.
      	(DECL_THUNKS): New macro.
      	* decl.c (duplicate_decls): Copy it.
      	* method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
      	* semantics.c (emit_associated_thunks): Simplify.
      
      	* g++.dg/abi/vthunk2.C: New test.
      
      From-SVN: r58536
      Mark Mitchell committed
  36. 18 Oct, 2002 1 commit