1. 17 Jan, 2003 4 commits
    • PR c++/9167, c++/9358 · 753225c1
              PR c++/9167, c++/9358
              * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
      
      From-SVN: r61459
      Jason Merrill committed
    • re PR c++/9342 (another ICE in cp_expr_size at cp/cp-lang.c: 304) · 77b996cc
              PR c++/9342
              * call.c (build_conditional_expr): Always do lvalue-rvalue
              conversion.
      
      From-SVN: r61457
      Jason Merrill committed
    • re PR c++/9294 ([new parser] parser enters infinite loop) · 5dae1114
      	PR c++/9294
      	* cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
      	* cp-tree.h (BASELINK_BINFO): Adjust.
      	(BASELINK_FUNCTIONS): Likewise.
      	(BASELINK_ACCESS_BINFO): Likewise.
      	(tree_baselink): New structure.
      	(cp_tree_node_structure_enum): Add TS_CP_BASELINK.
      	(lang_tree_node): Add baselink.
      	* decl.c (cp_tree_node_structure): Add BASELINK case.
      	* search.c (build_baselink): Adjust.
      	* tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
      	test from TREE_LIST case.
      
      	PR c++/9272
      	* parser.c (cp_parser_constructor_declarator_p): Do not assume
      	that a constructor cannot be declared outside of its own class.
      
      	* parser.c (cp_parser_resolve_typename_type): If the scope cannot
      	be resolved, neither can the qualified name.
      
      	* rtti.c (get_pseudo_ti_desc): Fix thinko.
      
      	PR c++/9272
      	* g++.dg/parse/ctor1.C: New test.
      
      	PR c++/9294:
      	* g++.dg/parse/qualified1.C: New test.
      
      	* g++.dg/parse/typename3.C: New test.
      
      From-SVN: r61456
      Mark Mitchell committed
    • re PR c++/8564 (ICE in find_function_data, at function.c:329) · a48cccea
              PR c++/8564
              * init.c (build_vec_init): Re-add maxindex parm.
              (perform_member_init, build_aggr_init): Pass it.
              (build_new_1): Pass it. Use an incomplete array type for full_type.
              * typeck.c (build_modify_expr): Pass it.
              * cp-tree.h: Adjust.
      
      From-SVN: r61422
      Jason Merrill committed
  2. 16 Jan, 2003 4 commits
    • cp-tree.h (tsubst_copy_and_build): New declaration. · cc23546e
      2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
      
      	* cp-tree.h (tsubst_copy_and_build): New declaration.
      	* pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
      	(tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
      	(tsubst_copy_and_build): New function.
      
      From-SVN: r61409
      Jeffrey D. Oldham committed
    • 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
    • re PR c++/9212 (Internal compiler error in grokdeclarator, at cp/decl.c:11052 [gcc 3.2]) · 712becab
      cp:
      	PR C++/9212
      	* parser.c (cp_parser_direct_declarator): If accepting either
      	abstract or named, the name must be an unqualified-id.
      testsuite:
      	* g++.dg/parse/ambig2.C: New test.
      
      From-SVN: r61399
      Nathan Sidwell committed
    • arm.h (CONDITIONAL_REGISTER_USAGE): Avoid signed/unsigned warning. · fc555370
      	* arm.h (CONDITIONAL_REGISTER_USAGE): Avoid signed/unsigned
      	warning.
      	* emit-rtl.c (gen_rtx_REG, set_mem_attributes_minus_bitpos,
      	init_emit_once): Likewise.
      	* flow.c (mark_regs_live_at_end, calculate_global_regs_live):
      	Likewise.
      	* function.c (assign_stack_temp_for_type): Likewise.
      	* loop.c (loop_invariant_p): Likewise.
      	* recog.c (push_operand): Likewise.
      	* regclass.c (init_reg_sets_1): Likewise.
      	* reload.c (update_auto_inc_notes): Likewise.
      	* reload1.c (reload_as_needed, emit_input_reload_insns): Likewise.
      	* stmt.c (expand_asm_operands): Likewise.
      	* stor-layout.c (start_record_layout): Likewise.
      
      cp:
      	* class.c (layout_virtual_bases): Avoid signed/unsigned warning.
      
      java:
      	* jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
      	warning.
      
      From-SVN: r61389
      Kaveh R. Ghazi committed
  3. 15 Jan, 2003 1 commit
    • decl2.c (check_classfn): Fix uninitialized warning. · dd1b7476
      cp:
      	* decl2.c (check_classfn): Fix uninitialized warning.
      	(build_anon_union_vars): Likewise.
      	* pt.c (tsubst_copy): Likewise.
      
      gcc:
      	* genattr.c (main): Rearrange output to avoid prototype warning.
      	* genautomata.c (transform_3): Fix ambiguous-else warning.
      	* local-alloc.c (requires_inout): Add parentheses around
      	assignment used as truth-value.
      	* timevar.c: Move system includes above local includes.  Include
      	toplev.h
      	* Makefile.in (timevar.o): Depend on toplev.h.
      
      From-SVN: r61308
      Kaveh R. Ghazi committed
  4. 14 Jan, 2003 2 commits
    • Further conform g++'s __vmi_class_type_info to the C++ ABI specification. · a7189b49
      2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
      
      	Further conform g++'s __vmi_class_type_info to the C++ ABI
      	specification.
      	* gcc/cp/rtti.c (dfs_class_hint_mark): Do not set hints not
      	specified by the specification.
      	(class_hint_flags): Likewise.
      	* gcc/testsuite/g++.old-deja/g++.abi/vmihint.C (main): Revise
      	expected flags per the specification.
      	* libstdc++-v3/libsupc++/cxxabi.h
      	(__vmi_class_type_info::__flags_masks): Remove enumerations not
      	required by the specification.
      
      From-SVN: r61304
      Jeffrey D. Oldham committed
    • 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
  5. 13 Jan, 2003 2 commits
  6. 11 Jan, 2003 1 commit
  7. 10 Jan, 2003 7 commits
  8. 09 Jan, 2003 5 commits
  9. 08 Jan, 2003 4 commits
  10. 07 Jan, 2003 6 commits
  11. 06 Jan, 2003 3 commits
    • re PR c++/9189 ([New parser] Order of default argument processing and function body compilation) · 8218bd34
      	PR c++/9189
      	* parser.c (cp_parser): Remove default_arg_types.  Update
      	documentation for unparsed_functions_queues.
      	(cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
      	parameter.
      	(cp_parser_new): Don't set parser->default_arg_types.
      	(cp_parser_function_definition): Adjust usage of
      	unparsed_funtions_queues.
      	(cp_parser_class_specifier): Don't mess with
      	parser->default_arg_types.  Handle default argument processing in
      	a separate phase from function body processing.
      	(cp_parser_template_declaration_after_export): Adjust usage of
      	unparsed_functions_queues.
      	(cp_parser_late_parsing_for_member): Do not handle default
      	arguments.
      
      	PR c++/9189
      	* g++.dg/parse/defarg3.C: New test.
      
      From-SVN: r60956
      Mark Mitchell committed
    • re PR c++/9109 (parse ambiguity) · 62b8a44e
      cp:
      	PR c++/9109
      	* parser.c (cp_parser_declarator_kind): New enum.
      	(cp_parser_declarator): Adjust.
      	(cp_parser_direct_declarator): Adjust. Allow for either named or
      	abstract declarator. Prefer abstract, if possible. Allow
      	parenthesized function name.
      	(cp_parser_condition): Adjust cp_parser_declarator call.
      	(cp_parser_explicit_instantiation): Likewise.
      	(cp_parser_init_declarator): Likewise.
      	(cp_parser_type_id): Likewise.
      	(cp_parser_function_definition): Likewise.
      	(cp_parser_member_declaration): Likewise.
      	(cp_parser_parameter_declaration): Use cp_parser_declarator to do
      	the tentative parsing.
      	(cp_parser_exception_declaration): Likewise.
      testsuite:
      	* g++.dg/parse/ambig1.C: New test.
      	* g++.dg/parse/defarg2.C: New test.
      
      From-SVN: r60944
      Nathan Sidwell committed
    • defarg-1.C: New test. · ec194454
      	* g++.dg/template/defarg-1.C: New test.
      	* g++.dg/template/local2.C: Likewise.
      
      From-SVN: r60924
      Mark Mitchell committed
  12. 05 Jan, 2003 1 commit
    • parser.c (cp_parser_binary_expression, [...]): Const-ify. · 39b1af70
      	* parser.c (cp_parser_binary_expression,
      	cp_parser_multiplicative_expression,
      	cp_parser_additive_expression, cp_parser_shift_expression,
      	cp_parser_relational_expression, cp_parser_equality_expression,
      	cp_parser_and_expression, cp_parser_exclusive_or_expression,
      	cp_parser_inclusive_or_expression,
      	cp_parser_logical_and_expression, cp_parser_logical_or_expression,
      	cp_parser_binary_expression): Const-ify.
      
      From-SVN: r60899
      Kaveh R. Ghazi committed