1. 08 Feb, 2002 1 commit
    • c-common.c (c_expand_expr): Revert 2002-02-06 patch. · 1cf537c5
      	* c-common.c (c_expand_expr): Revert 2002-02-06 patch.
      	* c-parse.in (compstmt): Clear last_expr_type.
      
      	* parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
      	instead of compstmt.
      	(compstmt_or_stmtexpr): Renamed from compstmt.
      	(compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
      
      	* gcc.c-torture/execute/20020206-1.c: Test whether nesting 2
      	expression statements work instead.
      	* gcc.dg/noncompile/20020207-1.c: New test.
      
      From-SVN: r49609
      Jakub Jelinek committed
  2. 07 Feb, 2002 2 commits
    • Rename instantiate_type_flags to tsubst_flags_t & expand use. · c2ea3a40
      	* cp-tree.h (instantiate_type_flags): Rename to ...
      	(tsubst_flags_t): ... here. Rename itf_complain to tf_error,
      	add tf_warning flag.
      	(instantiate_type): Adjust prototype.
      	(tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
      	do_type_instantiation, cp_build_qualified_type_real): Likewise.
      	cp_build_qualified_type: Adjust.
      	* class.c (instantiate_type): Adjust parameter. Rename itf_* to
      	tf_*.
      	* call.c (standard_conversion): Rename itf_* to tf_*.
      	(reference_binding): Likewise.
      	(convert_like_real): Likewise.
      	* cvt.c (cp_convert_to_pointer): Likewise.
      	(convert_to_reference): Likewise.
      	* decl.c (lookup_namespace_name): Use tf_* flags.
      	(make_typename_type): Likewise.
      	(grokdeclarator): Likewise.
      	* pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
      	(coerce_template_template_parms, convert_template_argument,
      	coerce_template_parms, maybe_get_template_decl_from_type_decl,
      	lookup_template_class, tsubst_friend_function, tsubst_friend_class,
      	instantiate_class_template, tsubst_template_arg_vector,
      	tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
      	tsubst_decl, tsubst_arg_types, tsubst_function_type,
      	tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
      	instantiate_template, fn_type_unification,
      	resolve_overloaded_unification, verify_class_unification,
      	unify, get_bindings_real, do_type_instantiation,
      	regenerate_decl_from_template, instantiate_decl,
      	tsubst_initializer_list, tsubst_enum,
      	get_mostly_instantiated_function_type,
      	invalid_nontype_parm_type_p): Likewise.
      	* tree.c (cp_build_qualified_type_real): Likewise.
      	* typeck.c (build_binary_op): Rename itf_* to tf_*.
      	(build_ptrmemfunc): Likewise.
      	(convert_for_assignment): Likewise.
      
      From-SVN: r49591
      Nathan Sidwell committed
    • re PR c++/109 (g++ 2.95.2 can't handle dependent friend member functions) · d5614afb
      cp:
      	PR c++/109
      	* decl.c (grokdeclarator): Allow friend declarations from
      	dependant types.
      	* decl2.c (handle_class_head): Don't push into template parm contexts.
      	* pt.c (push_template_decl_real): Template parm contexts are never
      	being defined.
      testsuite:
      	* g++.dg/template/friend4.C: New test.
      
      From-SVN: r49589
      Nathan Sidwell committed
  3. 05 Feb, 2002 2 commits
  4. 04 Feb, 2002 4 commits
    • PR c/4475, c++/3780: · 6f9fdf4d
      	* c-common.def (SWITCH_STMT): Add SWITCH_TYPE operand.
      	* c-common.h (SWITCH_TYPE): Define.
      	* c-typeck.c (c_start_case): Set SWITCH_TYPE.
      	* stmt.c (all_cases_count): Set lastval to thisval at end of loop.
      	Rename spareness variable to sparseness.
      	(expand_end_case_type): Renamed from expand_end_case, use orig_type
      	if non-NULL instead of TREE_TYPE (orig_index).
      	* tree.h (expand_end_case_type): Renamed from expand_end_case.
      	(expand_end_case): Define using expand_end_case_type.
      	* c-semantics.c (genrtl_switch_stmt): Pass SWITCH_TYPE
      	to expand_end_case_type.
      	* doc/c-tree.texi (SWITCH_STMT): Document SWITCH_TYPE.
      
      	* semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
      	(finish_switch_cond): Set SWITCH_TYPE.
      
      	* gcc.dg/Wswitch.c: Fix typos.  Don't return unconditionally
      	before all tests.  Move warning one line above to match where it
      	C frontend emits.
      	* gcc.dg/Wswitch-2.c: New test.
      	* g++.dg/warn/Wswitch-1.C: New test.
      	* g++.dg/warn/Wswitch-2.C: New test.
      
      From-SVN: r49497
      Jakub Jelinek committed
    • alpha.c (current_function_is_thunk): Don't check current_function_is_thunk. · 14691f8d
              * config/alpha/alpha.c (current_function_is_thunk): Don't check
              current_function_is_thunk.
              (alpha_sa_mask): Distinguish between current_function_is_thunk
              called from ASM_OUTPUT_MI_THUNK and not.
              (alpha_does_function_need_gp): Thunks always need gp.
              (alpha_start_function, alpha_output_function_end_prologue): Likewise.
              (alpha_output_mi_thunk_osf): New.
              * config/alpha/alpha-protos.h: Update.
              * config/alpha/alpha.h (ASM_OUTPUT_MI_THUNK): New.
      
      cp/
              * method.c (use_thunk): Always initialize the block tree.  Reindent.
              * semantics.c (expand_body): Emit thunks after function, not before.
      
      From-SVN: r49484
      Richard Henderson committed
    • decl.c (start_function): Call cplus_decl_attributes immediately after grokdeclarator. · e89a6075
              * decl.c (start_function): Call cplus_decl_attributes immediately
              after grokdeclarator.
      
              * decl.c (start_function): Combine DECL_RESULT handling code.
      
      From-SVN: r49480
      Jason Merrill committed
    • xref.c: Remove. · 9780c24f
              * xref.c: Remove.
              * Make-lang.in (CXX_OBJS): Remove cp/xref.o
              (cp/xref.o): Remove dependencies.
              * class.c (finish_struct_1, check_methods): Don't call xref fns.
              (finish_struct_1): Likewise.
              * friend.c (make_friend_class): Likewise.
              * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
              * spew.c (read_process_identifier): Likewise.
      
      From-SVN: r49472
      Jason Merrill committed
  5. 01 Feb, 2002 7 commits
  6. 31 Jan, 2002 2 commits
  7. 29 Jan, 2002 2 commits
    • re PR other/1502 (Nonexistent -W options not diagnosed) · ffdeea47
      	PR other/1502:
      	* cppinit.c (cpp_handle_option): Add ignore argument, if it is zero,
      	don't ignore unrecognized -W* options.
      	(cpp_handle_options): Pass 1 as last argument to cpp_handle_option.
      	* cpplib.h (cpp_handle_option): Adjust prototype.
      	* c-decl.c (c_decode_options): Pass 0 as last argument to
      	cpp_handle_option.
      
      	PR c/2896:
      	* gcc.c (cpp_unique_options): Split from cpp_options.
      	(cpp_options): Source cpp_unique_options.
      	(default_compilers): Use cpp_unique_options instead of cpp_options
      	when used together with cc1_options.
      	(static_specs): Add cpp_unique_options.
      	* objc/lang-specs.h: Use cpp_unique_options instead of cpp_options
      	when used together with cc1_options.
      
      	* decl2.c (cxx_decode_option): Pass 0 as last argument to
      	cpp_handle_option.
      	* lang-specs.h: Use cpp_unique_options instead of cpp_options
      	when used together with cc1_options.
      
      From-SVN: r49315
      Jakub Jelinek committed
    • re PR c++/5132 (NaN = 0.0 * HUGE_VAL fails to compile in templates) · b8b98c66
      cp:
      	PR c++/5132
      	* typeck2.c (digest_init): Make sure non-array core type is
      	instantiated.
      	* decl2.c (reparse_absdcl_as_casts): Just store the type in the
      	constructor, rather than build a new one.
      	(build_expr_from_tree, CONSTRUCTOR case): Be careful with the
      	PURPOSE of constructor elts.
      testsuite:
      	* g++.dg/template/ctor1.C: Add instantiation.
      
      From-SVN: r49314
      Nathan Sidwell committed
  8. 24 Jan, 2002 1 commit
    • Make-lang.in (parse.c): Adjust expected number of shift-reduce conflicts. · 7437519c
      	* Make-lang.in (parse.c): Adjust expected number of
      	shift-reduce conflicts.
      	(decl.o): Depend on diagnostic.h.
      	* decl.c: Include diagnostic.h.
      	(grokdeclarator): Check for null pointer.
      	(finish_function): Don't abort when
      	current_binding_level->parm_flag != 1, if errors have
      	occurred; throw away the statement tree and extra binding
      	levels, and continue.
      	* lex.c (note_list_got_semicolon): Check for null pointer.
      	* method.c (hack_identifier): Just return error_mark_node if
      	value is error_mark_node.
      	* parse.y (primary: TYPEID(type_id)): No need to use
      	TYPE_MAIN_VARIANT here.
      	(handler_seq): Accept an empty list of catch clauses and
      	generate a fake handler block to avoid later crashes.
      	(ansi_raise_identifier): Accept the error token too.
      	* semantics.c (begin_class_definition,
      	finish_class_definition): Check for error_mark_node.
      
      From-SVN: r49163
      Zack Weinberg committed
  9. 23 Jan, 2002 7 commits
  10. 22 Jan, 2002 2 commits
  11. 19 Jan, 2002 1 commit
  12. 17 Jan, 2002 2 commits
    • decl.c (begin_constructor_body, [...]): New fns. · cdd2559c
              * decl.c (begin_constructor_body, begin_destructor_body): New fns.
              (begin_function_body): Call them and keep_next_level.
              * init.c (emit_base_init): Call keep_next_level.
              * semantics.c (setup_vtbl_ptr): Lose.
              * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
              (vtbls_set_up_p): Lose.
              * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
              * method.c (do_build_copy_constructor): Likewise.
              (synthesize_method): Call finish_mem_initializers.
              * parse.y (nodecls): Likewise.
      
      From-SVN: r48948
      Jason Merrill committed
    • error.c (dump_type_suffix): Print the exception specs before recursing. · ad6b1795
              * error.c (dump_type_suffix): Print the exception specs before
              recursing.
              (dump_function_decl): Here, too.
      
              * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
      
      From-SVN: r48947
      Jason Merrill committed
  13. 10 Jan, 2002 4 commits
  14. 09 Jan, 2002 2 commits
  15. 08 Jan, 2002 1 commit