Commit Graph

785 Commits

Author SHA1 Message Date
Kazu Hirata 926ce8bd97 cvt.c: Remove uses of "register" specifier in declarations of arguments and local...
* cvt.c: Remove uses of "register" specifier in
	declarations of arguments and local variables.
	* decl.c: Likewise.
	* decl2.c: Likewise.
	* expr.c: Likewise.
	* friend.c: Likewise.
	* lex.c: Likewise.
	* name-lookup.c: Likewise.
	* repo.c: Likewise.
	* search.c: Likewise.
	* tree.c: Likewise.
	* typeck.c: Likewise.
	* typeck2.c: Likewise.

From-SVN: r74855
2003-12-19 23:28:11 +00:00
Mark Mitchell 89f1a6eccc re PR c++/10926 (ICE in build_delete when trying to declare template destructor)
PR c++/10926
	* decl2.c (grokfield): Robustify.

	PR c++/11116
	* parser.c (cp_parser_throw_expression): Determine whether or not
	an assignment-expression is present by doing one-token lookahead.

	PR c++/10926
	* g++.dg/template/error9.C: New test.

	PR c++/11116
	* g++.dg/template/error8.C: New test.

From-SVN: r74664
2003-12-16 02:46:31 +00:00
Nathan Sidwell f5c28a158b class.c (add_method): Disallow destructor for java classes.
cp:
	* class.c (add_method): Disallow destructor for java classes.
	* decl.c (xref_basetypes): Check java class inheritance.
	* decl2.c (check_java_method): Skip artificial params.
testsuite:
	* g++.dg/other/java1.C: New test.

From-SVN: r74629
2003-12-15 14:19:10 +00:00
Kriang Lerdsuwanakij d43f603d85 re PR c++/5369 (template member friend declaration not honored)
PR c++/5369
	* friend.c (is_friend): Handle member function of a class
	template as template friend.
	(do_friend): Likewise.
	* decl2.c (check_classfn): Add template_header_p parameter.
	* decl.c (start_decl): Adjust check_classfn call.
	(grokfndecl): Likewise.
	* pt.c (is_specialization_of_friend): New function.
	(uses_template_parms_level): Likewise.
	(push_template_decl_real): Use uses_template_parms_level.
	(tsubst_friend_function): Adjust check_classfn call.
	* cp-tree.h (check_classfn): Adjust declaration.
	(uses_template_parms_level): Add declaration.
	(is_specialization_of_friend): Likewise.

	* g++.dg/template/memfriend1.C: New test.
	* g++.dg/template/memfriend2.C: Likewise.
	* g++.dg/template/memfriend3.C: Likewise.
	* g++.dg/template/memfriend4.C: Likewise.
	* g++.dg/template/memfriend5.C: Likewise.
	* g++.dg/template/memfriend6.C: Likewise.
	* g++.dg/template/memfriend7.C: Likewise.
	* g++.dg/template/memfriend8.C: Likewise.
	* g++.old-deja/g++.pt/friend44.C: Remove a bogus error.

From-SVN: r73833
2003-11-22 06:49:21 +00:00
Jan Hubicka fccc4eb240 re PR rtl-optimization/12275 ([unit-at-a-time] ICE in htab_clear_slot)
PR opt/12275
	* c-decl.c (finish_decl): Use change_decl_assembler_name.
	* c-pragma.c (handle_pragma_redefine_extname): Likewise.
	* varasm.c (make_decl_rtl): Likewise.
	* cgraph.c (change_decl_assembler_name): New function.
	* tree.h (set_decl_assembler_name): Kill dead declaration.
	(change_decl_assembler_name): Declare.

	* decl.c (make_rtl_for_nonlocal_decl): Use change_decl_assembler_name.
	* decl2.c (make_rtl_for_nonlocal_decl): Use change_decl_assembler_name.

From-SVN: r73532
2003-11-13 02:07:57 +00:00
Kazu Hirata cd0be382c9 ChangeLog: Fix typos.
* ChangeLog: Fix typos.
	* call.c: Fix comment typos.
	* class.c: Likewise.
	* cp-tree.h: Likewise.
	* cvt.c: Likewise.
	* cxx-pretty-print.c: Likewise.
	* decl.c: Likewise.
	* decl2.c: Likewise.
	* init.c: Likewise.
	* mangle.c: Likewise.
	* name-lookup.c: Likewise.
	* parser.c: Likewise.
	* search.c: Likewise.
	* semantics.c: Likewise.
	* tree.c: Likewise.
	* typeck.c: Likewise.

From-SVN: r72737
2003-10-21 02:16:17 +00:00
Jan Hubicka 2344a722aa problem that current decl duplication mechanizm > > /* If we didn't remap this variable...
problem that current decl duplication mechanizm
>
>         /* If we didn't remap this variable, so we can't mess with its
>   	 TREE_CHAIN.  If we remapped this variable to the return slot, it's

From-SVN: r72539
2003-10-15 23:10:20 +00:00
Gabriel Dos Reis 5a167978fa name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
* name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
	(binding_for_name): Likewise.
	(cxx_binding_clear): Move to name-lookup.c.
	* name-lookup.c (cxx_scope_find_binding_for_name): Now static.
	(binding_for_name): Likewise.
	* decl2.c (is_ancestor): Move to name-lookup.c
	(namespace_ancestor): Likewise.
	(add_using_namespace): Likewise.
	(ambiguous_decl): Likewise.
	(lookup_using_namespace): Likewise.
	(qualified_lookup_using_namespace): Likewise.
	(set_decl_namespace): Likewise.
	(decl_namespace): Likewise.
	(current_decl_namespace): Likewise.
	(push_decl_namespace): Likewise.
	(pop_decl_namespace): Likewise.
	(push_scope): Likewise.
	(pop_scope): Likewise.
	(struct arg_lookup): Likewise.
	(arg_assoc): Likewise.
	(arg_assoc_args): Likewise.
	(arg_assoc_type): Likewise.
	(add_function): Likewise.
	(arg_assoc_namespace): Likewise.
	(arg_assoc_class): Likewise.
	(arg_assoc_template_arg): Likewise.
	(do_namespace_alias): Likewise.
	(validate_nonmember_using_decl): Likewise.
	(do_nonmember_using_decl): Likewise.
	(do_toplevel_using_decl): Likewise.
	(do_local_using_decl): Likewise.
	(do_class_using_decl): Likewise.
	(do_using_directive): Likewise.
	(constructor_name_full): Likewise.
	(constructor_name): Likewise.
	(constructor_name_p): Likewise.

From-SVN: r72462
2003-10-14 08:19:06 +00:00
Andreas Jaeger edaf3e0357 c-decl.c (finish_function): Convert definition to ISO C90.
* c-decl.c (finish_function): Convert definition to ISO C90.
	* ifcvt.c (mark_loop_exit_edges): Likewise.
	* ra-rewrite.c (emit_colors): Likewise.

For cp:

	* decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
	definition.
	* init.c (push_base_cleanups): Likewise.
	* decl2.c (finish_file): Likewise.
	* mangle.c (init_mangle): Likewise.
	(dump_substitution_candidates): Likewise.
	* search.c: Likewise.

From-SVN: r71872
2003-09-28 06:37:41 +02:00
Gabriel Dos Reis 147135cc00 cp-tree.h, [...]: Remove reference to macros BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
* cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
	macros 	BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.

From-SVN: r71848
2003-09-27 01:55:13 +00:00
Richard Henderson f31686a322 Revert DECL_SOURCE_LOCATION -> TREE_LOCUS change.
From-SVN: r71641
2003-09-21 22:09:32 -07:00
Richard Henderson 7e2af53a14 tree.h (TREE_LOCUS): Rename from DECL_SOURCE_LOCATION; make const.
* tree.h (TREE_LOCUS): Rename from DECL_SOURCE_LOCATION; make const.
	(TREE_FILENAME, TREE_LINENO): Likewise.
	(set_tree_locus, copy_tree_locus, set_tree_file_line): New.
	(TREE_LOCUS_SET_P): New.
	* c-aux-info.c, c-decl.c, c-parse.in, coverage.c, dbxout.c,
	diagnostic.c, dwarf2out.c, dwarfout.c, function.c, integrate.c,
	print-tree.c, stmt.c, toplev.c, tree-dump.c, tree-inline.c,
	tree-optimize.c, tree.c, tree.def, xcoffout.c, config/alpha/alpha.c,
	config/mips/mips.c, doc/c-tree.texi, objc/objc-act.c: Update to match.

ada/
	* trans.c, utils.c: Update for DECL_SOURCE_LOCATION rename and
	change to const.

cp/
	* class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
	method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
	DECL_SOURCE_LOCATION rename and change to const.

f/
	* com.c, ste.c: Update for DECL_SOURCE_LOCATION rename and
	change to const.

java/
	* class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
	resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.

treelang/
	* treetree.c: Update for DECL_SOURCE_LOCATION rename and
	change to const.

From-SVN: r71636
2003-09-21 16:39:40 -07:00
Richard Henderson ddd2d57e72 c-format.c (gcc_diag_char_table): Add %J.
* c-format.c (gcc_diag_char_table): Add %J.
        (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Likewise.
        (check_format_types): Fix wanted_type name lookup.
        (init_dynamic_diag_info): Setup %J.
        * diagnostic.c (text_specifies_location): Implement %J.
        * c-common.c, c-decl.c, c-objc-common.c, c-pragma.c, calls.c,
        dwarfout.c, expr.c, function.c, stmt.c, stor-layout.c, toplev.c,
        tree-inline.c, tree-optimize.c, varasm.c, config/arm/pe.c,
        config/i386/winnt.c, config/ia64/ia64.c, config/mcore/mcore.c,
        config/v850/v850.c, objc/objc-act.c: Use %J in diagnostics.

        * tree-inline.c: Include intl.h
        (inline_forbidden_p_1): Fix i18n of inline_forbidden_reason.
        * Makefile.in (tree-inline.o): Update.
cp/
        * decl.c, decl2.c, pt.c: Use %J in diagnostics.
java/
        * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
testsuite/
        * gcc.dg/format/gcc_diag-1.c: Add tests for %J.

From-SVN: r71619
2003-09-20 22:07:20 -07:00
Richard Henderson f6d1b84aa4 cgraphunit.c (cgraph_assemble_pending_functions): Export.
* cgraphunit.c (cgraph_assemble_pending_functions): Export.
        (cgraph_finalize_function): Revert TREE_ASM_WRITTEN check.
        * cgraph.h: Update.

        * decl2.c (finish_file): Check cgraph_assemble_pending_functions
        during relaxation loop.

From-SVN: r71360
2003-09-13 07:18:47 -07:00
David Edelsohn b44a178ae8 * decl2.c (var_finalized_p): Swap arms of conditional.
From-SVN: r71319
2003-09-11 16:47:13 -04:00
Richard Henderson 08deda2f65 * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
From-SVN: r71296
2003-09-10 22:55:16 -07:00
Jan Hubicka c4d2313d39 decl2.c (var_finalized_p): New.
* decl2.c (var_finalized_p): New.
	(maybe_emit_vtables, write_out_vars, finish_file): Use it.

From-SVN: r71284
2003-09-10 23:46:26 +00:00
Richard Henderson 25c84396dd cgraph.h (struct cgraph_node): Rename lowered to analyzed.
* cgraph.h (struct cgraph_node): Rename lowered to analyzed.
        * cgraphunit.c: Update to match.
        (record_call_1): Rearrange.  Call lang hook for language nodes.
        (cgraph_analyze_function): Don't call lower_function.
        * langhooks.h (struct lang_hooks_for_callgraph): Replace
        lower_function with analyze_expr.
        * langhooks-def.h: Update to match.
        * langhooks.c (lhd_callgraph_analyze_expr): New.

        * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
        mark_member_pointers.
        (lower_function): Remove.
        * cp-tree.h: Update to match.
        * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
        (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.

From-SVN: r71277
2003-09-10 12:16:20 -07:00
Richard Henderson e4d9102785 decl2.c (finish_file): Avoid out-of-bounds array reference during memmove.
* decl2.c (finish_file): Avoid out-of-bounds array reference
        during memmove.

From-SVN: r71261
2003-09-09 19:41:43 -07:00
Richard Henderson dd07abd725 except.c: Include cgraph.h.
* except.c: Include cgraph.h.
        (output_function_exception_table): Invoke
        cgraph_varpool_mark_needed_node.
        * Makefile.in (except.o): Update.

        * decl2.c (mark_member_pointers): Rename from
        mark_member_pointers_and_eh_handlers and don't check eh handlers.

From-SVN: r71254
2003-09-09 17:09:09 -07:00
Mark Mitchell fa531100f1 re PR c++/11786 (operator() call on variable in other namespace not recognized)
PR c++/11786
	* decl2.c (add_function): Do not complain about seeing the same
	non-function twice.
	* semantics.c (perform_koenig_lookup): Improve documentation.

	PR c++/11786
	* g++.dg/lookup/koenig2.C: New test.

From-SVN: r71213
2003-09-08 18:46:20 +00:00
Richard Henderson c1f927e84e c-decl.c (c_expand_body_1): Push and pop function context here.
gcc/
        * c-decl.c (c_expand_body_1): Push and pop function context here.
        * tree-optimize.c (tree_rest_of_compilation): ... not here.  Take
        nested argument instead of computing nesting ourselves.

gcc/cp/
        * decl.c (finish_function): Clear current_function_decl.
        * decl2.c (mark_used): Don't push/pop gc context.
        * optimize.c (optimize_function): Likewise.
        * tree.c (cp_cannot_inline_tree_fn): Likewise.
        * pt.c (instantiate_decl): Inc/dec function_depth instead.
        * semantics.c (expand_body): Update for tree_rest_of_compilation
        nested argument.

From-SVN: r71208
2003-09-08 08:56:27 -07:00
Jan Hubicka c57e159892 decl2.c (maybe_emit_vtables, [...]): Avoid re-emitting variables in unit-at-a-time mode.
* decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
	Avoid re-emitting variables in unit-at-a-time mode.

From-SVN: r71167
2003-09-07 11:15:46 +00:00
Nathan Sidwell 8e1daa3412 re PR c++/12037 (Spurious "statement has no effect" in templates)
cp:
	PR c++/12037
	* cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
	(build_min_non_dep): Declare.
	* tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
	(build_min_non_dep): New.
	* cvt.c (convert_to_void): Don't explicitly copy
	TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
	* call.c (build_new_method_call): Use build_min_non_dep.
	* decl2.c (grok_array_decl): Likewise.
	(build_offset_ref_call_from_tree): Likewise.
	* typeck.c (finish_class_member_access_expr,
	build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
	build_x_conditional_expr, build_x_compound_expr): Likewise.
	(build_static_cast, build_reinterpret_cast,
	build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
	* typeck2.c (build_x_arrow): Use build_min_non_dep.
	(build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
	template.
	* rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
	(build_dynamic_cast): Set TREE_SIDE_EFFECTS.
	* pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
testsuite:
	PR c++/12037
	* g++.dg/warn/noeffect4.C: New test.

From-SVN: r71108
2003-09-05 08:24:28 +00:00
Richard Henderson 8dafba3ca4 cgraph.c (cgraph_mark_reachable_node): Split out from ...
* cgraph.c (cgraph_mark_reachable_node): Split out from ...
        (cgraph_mark_needed_node): Remove needed argument.
        * cgraph.h: Update to match.
        * cgraphunit.c (decide_is_function_needed): Split out from ...
        (cgraph_finalize_function): Reorg.  Avoid deferred_inline_function
        if we generated the function.
        (record_call_1): Update for cgraph_mark_reachable_node.
        * varasm.c (mark_referenced): Likewise.
        * objc/objc-act.c (mark_referenced_methods): Likewise.

        * decl2.c (mark_member_pointers_and_eh_handlers): Update for
        change in cgraph_mark_needed_node arguments.

From-SVN: r71104
2003-09-04 21:24:30 -07:00
Geoffrey Keating 1a9861e629 re PR c++/12161 (ICE during bootstrap, locale-inst.c, cp/call.c: 4571)
PR 12161
	* decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
	* tree.c (cp_cannot_inline_tree_fn): Likewise.

From-SVN: r71084
2003-09-04 19:48:22 +00:00
Mark Mitchell 43dc123f52 re PR target/8795 ([PPC] Altivec related bugs concerning gcc 3.3 and mainline)
PR c++/8795
	* tree.h (build_method_type_directly): Declare.
	* c-common.c (handle_vector_size_attributes): Handle METHOD_TYPEs.
	(vector_size_helper): Likewise.
	* tree.c (build_method_type_directly): New function.
	(build_method_type): Use it.

	PR c++/8795
	* cp-tree.h (build_cplus_method_type): Remove.
	* call.c (standard_conversion): Use build_method_type_directly
	instead of build_cplus_method_type.
	* class.c (build_clone): Likewise.
	(adjust_clone_args): Likewise.
	* decl.c (build_ptrmem_type): Likewise.
	(grokdeclarator): Likewise.
	(check_function_type): Likewise.
	* decl2.c (grok_method_quals): Likewise.
	(maybe_retrofit_in_chrg): Likewise.
	* pt.c (copy_default_args_to_explicit_spec): Likewise.
	(tsubst_function_type): Likewise.
	(tsubst): Likewise.
	* tree.c (build_cplus_method_type): Remove.
	* typeck.c (merge_types): Use build_method_type_directly.

	PR c++/8795
	* g++.dg/ext/altivec-1.C: New test.

From-SVN: r70773
2003-08-25 15:47:43 +00:00
Mark Mitchell f3c2dfc629 re PR c++/11551 (g++ accepts typedef as destructor name)
PR c++/11551
	* parser.c (cp_parser_id_expression): Add declarator_p parameter.
	(cp_parser_primary_expression): Adjust call to
	cp_parser_id_expression.
	(cp_parser_unqualified_id): Complain about the use of
	typedef-names in a destructor declarator.
	(cp_parser_postfix_expression): Adjust call to
	cp_parser_id_expression.
	(cp_parser_type_parameter): Likewise.
	(cp_parser_template_argument): Likewise.
	(cp_parser_declarator_id): Likewise.

	PR c++/11919
	* call.c (standard_conversion): Use same_type_p, not pointer
	equality, to compare types.

	PR c++/10762
	* parser.c (cp_parser_using_declaration): Check for invalid uses
	of template-ids here...
	* decl2.c (do_class_using_decl): ... rather than here.

	PR c++/11919
	* g++.dg/overload/prom1.C: New test.

	PR c++/11551
	* g++.dg/parse/dtor2.C: New test.

	PR c++/10762
	* g++.dg/parse/using2.C: New test.

From-SVN: r70652
2003-08-21 17:44:16 +00:00
Mark Mitchell 4b0d3cbe3e re PR c++/11946 (fun and merriment with enums as function arguments)
PR c++/11946
	* convert.c (convert_to_integer): Use CONVERT_EXPR (instead of
	NOP_EXPR) when necessary.
	* c-common.c (c_common_signed_or_unsigned_type): Correctly handle
	types with precisions other than those given by native machine
	modes.

	PR c++/11684
	* cp-tree.h (grok_op_properties): Change prototype.
	* decl.c (grok_op_properties): Add complain parameter.
	(grokfndecl): Pass it.
	* pt.c (tsubst_decl): Adjust accordingly.

	PR c++/10926
	* decl.c (start_method): Return immediately if push_template_decl
	does not like the declaration.
	* pt.c (push_template_decl_real): Disallow member template
	destructors.

	PR c++/11036.C
	* cp-tree.h (add_binding): Add prototype.
	* class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
	(maybe_warn_about_overly_private_class): Use
	CLASSTYPE_DESTRUCTORS.
	(pushclass): Adjust call to set_identifier_type_value.
	* decl.c (add_binding): Give it external linkage.
	(push_local_binding): Adjust call to add_binding.
	(push_class_binding): Likewise.
	(set_identifier_type_value_with_scope): Change prototype.  Use
	add_binding for global bindings.
	(set_identifier_type_value): Adjust accordingly.
	(pushtag): Likewise.
	(pushdecl): Use set_identifier_type_value, not
	set_identifier_type_value_with_scope.
	(pushdecl_namespace_level): Adjust calls to
	SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
	(pushdecl_class_level): Likewise.
	(lookup_tag): Use select_decl.
	(select_decl): Improve comment.
	(record_builtin_type): Do not call pushdecl.
	(cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
	(cp_finish_decl): Adjust call to set_identifier_type_value.
	(check_elaborated_type_specifier): Improve checks for invalid uses
	of typedefs.
	(xref_tag): Adjust call to check_elaborated_type_specifier.
	* decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
	* name-lookup.c (set_namespace_binding): Use add_binding.
	* parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
	rather than an IDENTIFIER_NODE, to represent built-in types, if
	requested by the caller.
	(cp_parser_postfix_expression): Adjust call.
	(cp_parser_type_specifier): Likewise.
	(cp_parser_elaborated_type_specifier): Adjust call to
	check_elaborated_type_specifier.
	* typeck2.c (build_functional_cast): Do not perform name lookups.

	PR c++/10717
	* decl.c (expand_static_init): Remove unncessary code.

	PR c++/10926
	* g++.dg/template/dtor2.C: New test.

	PR c++/11684
	* g++.dg/template/operator1.C: New test.
	* g++.dg/parse/operator4.C: New test.

	PR c++/11946.C
	* g++.dg/expr/enum1.C: New test.
	* gcc.dg/c99-bool-1.c: Remove bogus warning.

	PR c++/11036.C
	* g++.dg/parse/elab2.C: New test.
	* g++.dg/parse/typedef4.C: Change error message.
	* g++.old-deja/g++.robertl/eb133.C: Remove bogus error markers.
	* g++.old-deja/g++.robertl/eb133a.C: Remove bogus error markers.
	* g++.old-deja/g++.robertl/eb133b.C: Remove bogus error markers.

From-SVN: r70593
2003-08-20 07:06:47 +00:00
Nathan Sidwell 018a580308 cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
* cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
	* decl2.c (build_offset_ref_call_from_tree): Use
	build_non_dependent_expr.
	* error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
	* pt.c (build_non_dependent_expr): Set operand.

From-SVN: r70478
2003-08-15 12:15:56 +00:00
Jan Hubicka 6cad4e1709 decl2.c (mark_member_pointers): Rename to...
* decl2.c (mark_member_pointers): Rename to...
	(mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
	(lower_function): Update call.
	* except.c (eh_type_info): Break out from ...
	(build_eh_type): ... here; tinfo is already used.
        (finish_eh_spec_block): Mark tinfos as used.
        * semantics.c (finish_handler_params): Mark tinfo as used.
	* cp-tree.h(eh_type_info): Declare.

From-SVN: r70477
2003-08-15 11:14:01 +00:00
Mark Mitchell 560ad596bd re PR c++/11703 (Problem with using enum in placement delete)
PR c++/11703
	* call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
	determine whether or not to promote types.
	(convert_for_arg_passing): Likewise.
	* decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
	templates.
	* pt.c (tsubst_decl): Do not expect it to be set.

	PR c++/9512
	PR c++/10923
	* cp-tree.h (check_elaborated_type_specifier): Declare.
	(handle_class_head): Remove.
	(note_got_semicolon): Likewise.
	(note_list_got_semicolon): Likewise.
	(finish_class_definition): Likewise.
	* decl.c (check_elaborated_type_specifier): Make it public.
	Robustify.
	(handle_class_head): Remove.
	* parser.c (cp_parser_elaborated_type_specifier): Use
	check_elaborated_type_specifier.
	(cp_parser_class_specifier): Do not call finish_class_definition.
	(cp_parser_class_head): Or handle_class_head.  Check for
	over-qualified names.
	* semantics.c (finish_class_definition): Remove.

	* parser.c (cp_parser_check_for_definition_in_return_type): New
	function.
	(cp_parser_simple_declaration): Adjust call to
	cp_parser_init_declarator.
	(cp_parser_decl_specifier_seq): Change type of
	declares_class_or_enum parameter.
	(cp_parser_explicit_instantiation): Adjust accordingly.
	(cp_parser_type_specifier): Change type of
	declares_class_or_enum parameter.
	(cp_parser_init_declarator): Add declares_class_or_enum
	parameter.
	(cp_parser_parameter_declaration): Adjust call to
	cp_parser_decl_specifier_seq.
	(cp_parser_function_definition): Likewise.
	(cp_parser_member_declaration): Likewise.
	(cp_parser_single_declaration): Likewise.

	* cp-tree.h (lang_type_class): Remove has_call_overloaded,
	has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
	(TYPE_OVERLOADS_CALL_EXPR): Remove.
	(TYPE_OVERLOADS_ARRAY_REF): Likewise.
	(TYPE_OVERLOADS_ARROW): Likewise.
	(CLASSTYPE_GOT_SEMICOLON): Likewise.
	* class.c (check_bases): Do not set them.
	(finish_struct_1): Likewise.
	* decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
	(build_ptrmemfunc_type): Likewise.
	(grok_op_properties): Do not set TYPE_OVERLOADS_*.
	(start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
	* decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
	* lex.c (note_got_semicolon): Remove.
	(note_list_got_semicolon): Likewise.
	* parser.c (cp_parser_simple_declaration): Do not call
	note_list_got_semicolon.
	* pt.c (list_eq): Remove.
	(lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
	(instantiate_class_template): Do not set TYPE_OVERLOADS*.
	(instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
	* ptree.c (cxx_print_type): Do not print them.
	* semantics.c (finish_member_class_template): Do not call
	note_list_got_semicolon.

	* g++.dg/parse/ret-type2.C: New test.

	PR c++/11703
	* g++.dg/init/new8.C: New test.

	PR c++/10923
	* g++.dg/parse/typedef5.C: New test.

	PR c++/9512
	* g++.dg/parse/qualified2.C: New test.
	* g++.old-deja/g++.other/decl5.C: Mark one more instance of
	invalid code.

From-SVN: r70391
2003-08-12 22:26:25 +00:00
Nathan Sidwell bf12d54dac cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL NODE is always a TREE_VEC of non-zero size.
cp:
	* cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
	NODE is always a TREE_VEC of non-zero size.
	(NUM_TMPL_ARGS): NODE is always a TREE_VEC.
	* decl2.c (arg_assoc): Template args will be a vec.
	* error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
	dump_template_argument_list.
	(dump_template_parms): Args will be a vec.
	* parser.c (cp_parser_template_argument_list): Produce a
	vector, not a list.
	* pt.c (coerce_template_parms): Args are always vectors.
	(mangle_class_name_for_template): Likewise.
	(lookup_template_function): Likewise.
	(lookup_template_class): Likewise.
	(tsubst_template_args): Likewise.
	(tsubst_baselink): Use tsubst_template_args.
	(tsubst_qualified_id): Likewise.
	(tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
	(tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
	(any_dependent_template_args_p):  Args are always vectors.
	* tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.

From-SVN: r70295
2003-08-10 15:10:35 +00:00
Steven Bosscher b3c3af2f63 tree.h (DID_INLINE_FUNC): Remove macro.
2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>

	* tree.h (DID_INLINE_FUNC): Remove macro.
	(DECL_DECLARED_INLINE_P): Move from c-tree.h and cp/cp-tree.h,
	add tree check for FUNCTION_DECL.
	(DECL_ESTIMATED_INSNS): Move from c-common.h and java/java-tree.h.
	(struct tree_decl): Rename inlined_function_flag to
	declared_inline_flag.
	* c-common.h (c_lang_decl): Remove.
	(DECL_ESTIMATED_INSNS): Remove.
	* c-tree.h (struct lang_decl): Don't include c_lang_decl.
	(DECL_DECLARED_INLINE_P): Remove.
	* c-decl.c (grokdeclarator): Update comment.  With -finline-functions,
	do not reset DECL_DECLARED_INLINE_P.  Don't use DID_INLINE_FUNC.
	(finish_function): Make uninlinable a bool.  Fixup call to
	tree_inlinable_function_p() and fix some code style issues.
	* cgraph.h (disgread_inline_limits): Fix spelling: `disregard'.
	* cgraph.c (dump_cgraph): Likewise.
	* cgraphunit.c (cgraph_decide_inlining): Likewise
	(cgraph_finalize_compilation_unit): Likewise.
	Also update call to tree_inlinable_function_p().
	(cgraph_default_inline_p): Don't use DID_INLINE_FUNC.  Instead
	look at DECL_DECLARED_INLINE and reverse logic.
	* print-tree.c (print_node): Likewise.
	* toplev.c (rest_of_handle_inlining): Don't use DID_INLINE_FUNC.
	* tree-inline.h (tree_inlinable_function_p): Make a bool.  Update
	prototype.
	* tree-inline.c (inlinable_function_p): Split up in this function to
	check for basic inlining inhibiting conditions, and new
	limits_allow_inlining() function.  Warn if inlining is impossible
	because the inline candidate calls alloca or uses sjlj exceptions.
	(limits_allow_inlining): this new function to check if the inlining
	limits are satisfied.  Throttle from currfn_max_inline_insns, not from
	MAX_INLINE_INSNS_SINGLE.  The latter only makes sense if
	MAX_INLINE_INSNS_AUTO and MAX_INLINE_INSNS_SINGLE are equal.
	Update prototypes.
	(tree_inlinable_function_p): Make a bool.  Update call to
	inlinable_function_p
	(expand_call_inline): Use limits_allow_inlining() when not in
	unit-at-a-time mode to decide on inlining.  Don't use DID_INLINE_FUNC,
	instead see if the function was declared `inline'.

cp/
	* cp-tree.h (struct lang_decl): Don't include c_lang_decl.
	(DECL_DECLARED_INLINE_P): Remove.
	* decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
	if decl is a FUNCTION_DECL.  This never made sense, but now it is
	required to avoid a tree check failure.
	* decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
	* optimize.c (maybe_clone_body): Likewise.

java/
	* java-tree.h (DECL_ESTIMATED_INSNS): Remove.

From-SVN: r70174
2003-08-05 14:11:53 +00:00
Nathan Sidwell fd9aef9d18 re PR c++/9447 (using Base<T>::member does not work)
cp:
	PR c++/9447
	* cp-tree.def (USING_DECL): Document its type.
	* class.c (pushclass): If we're entering a template, push any
	dependent using decls it has.
	* decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
	a dependent scope.
	* pt.c (tsubst_decl) <USING_DECL case>: Set type.
	(tsubst): Remove USING_DECL checks.
	(type_dependent_expression_p): Remove USING_DECL case.
	* semantics.c (finish_member_declaration): A USING_DECL's type
	indicates whether it is dependent.
testsuite:
	PR c++/9447
	* g++.dg/template/using7.C: New test.

From-SVN: r70107
2003-08-02 18:52:16 +00:00
Kriang Lerdsuwanakij cbd63935d8 PR c++/8442, c++/8806
PR c++/8442, c++/8806
	* decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
	preferred.
	(check_elaborated_type_specifier): Add allow_template_p
	parameter.  Check tag mismatch and class template.
	(xref_tag): Add template_header_p parameter.  Add assertion
	that name is an IDENTIFIER_NODE.  Remove implicit typename
	warning.  Simplify lookup process if globalize is true.
	(cxx_init_decl_processing): Adjust call to xref_tag.
	(xref_tag_from_type): Likewise.
	* decl2.c (handle_class_head): Likewise.
	* parser.c (cp_parser_elaborated_type_specifier,
	cp_parser_class_head): Likewise.
	* rtti.c (init_rtti_processing, build_dynamic_cast1,
	tinfo_base_init, emit_support_tinfos): Likewise.
	* class.c (is_base_of_enclosing_class): Remove.
	* pt.c (convert_template_argument): Don't accept RECORD_TYPE as
	template template argument.
	* cp-tree.h (xref_tag): Adjust declaration.
	(is_base_of_enclosing_class): Remove.
	* NEWS: Document template template argument change.

	* g++.dg/template/elab1.C: Likewise.
	* g++.dg/template/type2.C: Likewise.
	* g++.dg/template/ttp3.C: Adjust expected error message.
	* g++.old-deja/g++.law/visibility13.C: Likewise.
	* g++.old-deja/g++.niklas/t135.C: Likewise.
	* g++.old-deja/g++.pt/ttp41.C: Likewise.
	* g++.old-deja/g++.pt/ttp43.C: Use qualified name for template
	template argument.
	* g++.old-deja/g++.pt/ttp44.C: Likewise.

From-SVN: r70048
2003-08-01 15:06:02 +00:00
Nathan Sidwell 522da2bf7e re PR c++/9447 (using Base<T>::member does not work)
cp:
	PR c++/9447
	* decl2.c (do_class_using_decl): Set type to NULL_TREE.
	* semantics.c (finish_expr_stmt): Do not convert to void in a
	template.
testsuite:
	PR c++/9447
	* g++.dg/template/using5.C: New test.

From-SVN: r70039
2003-08-01 09:01:12 +00:00
Jan Hubicka 9faa149ca3 decl2.c (maybe_make_one_only): Use mark_referenced.
* decl2.c (maybe_make_one_only): Use mark_referenced.
	* method.c (use_thunk): Likewsie.

From-SVN: r69979
2003-07-30 23:47:59 +00:00
Jan Hubicka a0c8285b03 re PR c/10320 (gcc 3.4 gets rid of static inline function that does not get inlined)
* gcse.c (insert_store): Ignore fake edges.

	* c-common.c (flag_vtable_gc): Kill.
	* c-common.g (flag_vtable_gc): Kill.
	* c-opts (c_common_handle_option): Kill.
	* c.opt (fvtable-gc): Kill.
	* final.c (final_scan_insn): Do not call assemble_vtable_entry.
	* output.h (assemble_vtable_entry, assemble_vtable_inherit): Kill.
	* varasm.c (assemble_vtable_entry, assemble_vtable_inherit): Kill.

	* invoke.texi (-ftable-gc): Kill documentation.

	PR C/10320
	* tree-inline.c (inlinable_function_p): Don't set DECL_UNINLINABLE
	just because function body is missing.

	* i386.c (pic_symbolic_operand): Properly detect RIP relative unspecs.

	* class.c (build_vtable_entry_ref): Kill.
	(build_vtbl_ref_1): Do not call build_vtable_entry_ref.
	(build_vfn_ref): Do not call build_vtable_entry_ref.
	* cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
	* cp-tree.h (prepare_assemble_variable): Kill.
	* cp-decl.c (prepare_assemble_variable): Kill.

From-SVN: r69964
2003-07-30 17:27:17 +00:00
Nathan Sidwell 399dedb996 re PR c++/9447 (using Base<T>::member does not work)
cp:
	PR c++/9447
	* decl.c (add_binding): Add bval local variable.
	(push_class_level_binding): Likewise. Allow a USING_DECL to be
	pushed.
	* decl2.c (do_class_using_decl):  The type of a using decl is
	unknown.
	* parser.c (cp_parser_postfix_expression): Refactor unqualified-id
	function call lookup code.
	* pt.c (tsubst): A USING_DECL will have unknown type.
	(tsubst_copy_and_build): Allow a using decl.
	(type_dependent_expression_p): A USING_DECL will make it
	dependent.
	* semantics.c (finish_member_declaration): Push a dependent using
	declaration.
testsuite:
	PR c++/9447
	* g++.dg/template/using1.C: New test.
	* g++.dg/template/using2.C: New test.
	* g++.dg/template/using3.C: New test.
	* g++.dg/template/using4.C: New test.

From-SVN: r69921
2003-07-29 11:16:50 +00:00
Jan Hubicka 58579435ee decl2.c (mark_member_pointers): Verify that member pointer points to the function.
* decl2.c (mark_member_pointers): Verify that member pointer points to
	the function.

From-SVN: r69902
2003-07-28 21:59:30 +00:00
Nathan Sidwell 7a3397c739 cp-tree.h (begin_compound_stmt): No scope arg is a bool.
* cp-tree.h (begin_compound_stmt): No scope arg is a bool.
	(finish_compound_stmt): Remove no scope arg.
	* decl.c (register_dtor_fn): Adjust begin_compound_stmt and
	end_compound_stmt calls.
	(expand_static_init, begin_destructor_body, begin_function_body,
	finish_function_body): Likewise.
	* decl2.c (start_objects, finish_objects,
	start_static_storage_duration_function,
	finish_static_storage_duration_function): Likewise.
	* init.c (begin_init_stmts, finish_init_stmts,
	construct_virtual_base, build_vec_init): Likewise.
	* method.c (do_build_assign_ref, synthesize_method): Likewise.
	* parser.c (cp_parser_compound_statement,
	cp_parser_implicitly_scoped_statement,
	cp_parser_already_scoped_statement): Likewise.
	* pt.c (tsubst_expr): Likewise.
	* semantics.c (begin_compound_stmt): No scope arg is a bool.
	(finish_compound_stmt): Remove no scope arg.

	* error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
	always dyadic.

From-SVN: r69882
2003-07-28 11:06:31 +00:00
Kaveh R. Ghazi c68b0a8425 fixfixes.c [...]: Remove unnecessary casts.
gcc:
	* fixinc/fixfixes.c fixinc/fixincl.c fixinc/fixlib.c
	fixinc/server.c objc/objc-act.c: Remove unnecessary casts.

f:
	* com.c data.c expr.c fini.c g77spec.c global.c lab.c lex.c name.c
	sta.c stc.c std.c storag.c stt.c stw.c symbol.c target.c type.c:
	Remove unnecessary casts.

cp:
	* call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
	semantics.c typeck.c: Remove unnecessary casts.

java:
	* class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
	casts.

treelang:
	* treetree.c: Remove unnecessary casts.

From-SVN: r69593
2003-07-19 16:09:51 +00:00
Nathan Sidwell 633221dbab PR c++ 9483
cp:
	PR c++ 9483
	* class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
	* decl2.c (constructor_name_p): Avoid repeated constructor_name
	calls.
	* decl.c (grokdeclarator): Refactor ctor/dtor detection.
testsuite:
	PR c++ 9483
	* g++.dg/other/field1.C: New test.

From-SVN: r69180
2003-07-10 09:02:06 +00:00
Mark Mitchell d17811fd1a fold-const.c (make_range): Do not access operand 1 for a zero-operand operator.
* fold-const.c (make_range): Do not access operand 1 for a
	zero-operand operator.

2003-07-08  Mark Mitchell  <mark@codesourcery.com>

	* cp-tree.def (NON_DEPENDENT_EXPR): New node.
	* cp-tree.h (build_call_from_tree): Remove.
	(build_member_call): Likewise.
	(dependent_template_arg_p): Remove.
	(any_dependent_template_arguments_p): New function.
	(dependent_template_id_p): Likewise.
	(any_type_dependent_arguments_p): Likewise.
	(build_non_dependent_expr): Likewise.
	(build_non_dependent_args): Likewise.
	(build_x_compound_expr): Adjust prototype.
	* call.c (build_new_method_call): Handle non-dependent expressions
	correctly.
	* decl2.c (grok_array_decl): Likewise.
	(build_offset_ref_call_from_tree): Likewise.
	(build_call_from_tree): Remove.
	* error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
	(dump_expr): Likewise.
	* init.c (build_member_call): Remove.
	* mangle.c (write_expression): Update handling for template-ids.
	* parser.c (cp_parser_primary_expression): Use
	any_dependent_template_arguments_p.  Update constant-expression
	handling.
	(cp_parser_postfix_expression): Use
	any_type_dependent_arguments_p.  Simplify call processing.
	(cp_parser_unary_expression): Simplify.
	(cp_parser_expression): Adjust for changes to
	build_x_compound_expr.
	(cp_parser_template_argument): Implement standard-conforming
	parsing of non-type template arguments.
	(cp_parser_direct_declarator): Use
	cp_parser_fold_non_dependent_expr.
	(cp_parser_fold_non_dependent_expr): New function.
	(cp_parser_next_token_ends_template_argument_p): Likewise.
	* pt.c (convert_template_argument): Do not call
	maybe_fold_nontype_arg.
	(tsubst_baselink): Likewise.
	(tsubst_copy_and_build): Share common code.  Make sizeof/alignof
	processing work correctly for non-dependent expressions.  Adjust
	handling of COMPOUND_EXPR.  Simplify call processing.
	(value_dependent_expression_p): Deal with functional casts and
	sizeof/alignof correctly.
	(type_dependent_expression_p): Handle overloaded functions.
	(any_type_dependent_arguments_p): New function.
	(any_dependent_template_arguments_p): Likewise.
	(dependent_template_p): Treat SCOPE_REFs as dependent.
	(dependent_template_id_p): Simplify.
	(build_non_dependent_expr): New function.
	(build_non_dependent_args): Likewise.
	* semantics.c (finish_stmt_expr): Don't make dependent
	statement-expresions have void type.
	(finish_call_expr): Handle non-dependent expressions
	correctly.
	* tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
	* typeck.c (cxx_sizeof_or_alignof_type): Give the expression
	type size_t, even in templates.
	(expr_sizeof): Likewise.
	(finish_class_member_access_expr): Handle non-dependent expressions
	correctly.
	(build_x_indirect_ref): Likewise.
	(build_x_binary_op): Likewise.
	(build_x_unary_op): Likewise.
	(build_x_conditional_expr): Likewise.
	(build_x_compound_expr): Likewise.
	* typeck2.c (build_x_arrow): Likewise.

2003-07-08  Mark Mitchell  <mark@codesourcery.com>

	* g++.dg/abi/mangle17.C: Make sure template expressions are
	dependent.
	* g++.dg/abi/mangle4.C: Mark erroneous casts.
	* g++.dg/debug/debug7.C: Mark erronous new-declarator.
	* g++.dg/opt/stack1.C: Remove erroneous code.
	* g++.dg/parse/template7.C: New test.
	* g++.dg/template/dependent-expr1.C: Mark erroneous code.
	* g++.old-deja/g++.pt/crash4.C: Likewise.

2003-07-09  Mark Mitchell  <mark@codesourcery.com>

	* gcj/array.h (JvPrimClass): Don't parenthesize the output.

From-SVN: r69130
2003-07-09 08:48:08 +00:00
Jan Hubicka 084c177908 java-tree.h (DECL_NUM_STMTS): Rename to...
* java-tree.h (DECL_NUM_STMTS): Rename to...
	(DECL_ESTIMATED_INSNS): ... this.
	* lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
	New static functions.
	(LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
	* parser.y (add_stmt_to_compound): Do not account statements.

	* cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
	* decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
	(start_function): Use DECL_ESTIMATED_INSNS.
	* optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.

	* decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
	unit-at-a-time

	* c-common.c (c_estimate_num_insns_1): New static function.
	(c_estimate_num_insns): New global function.
	* c-common.h (DECL_NUM_STMTS): Rename to...
	(DECL_ESTIMATED_INSNS): ... this.
	(c_estimate_num_insns): Declare.
	* c-decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
	* c-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
	* c-semantics.c (add_stmt): Do not account statements.
	* langhooks-def.h (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS):
	New.
	* langhooks.h (lang_hooks_for_tree_inlining): Add
	estimate_num_insns
	* params.def (max-inline-insns-auto, max-inline-insns-auto): set
	to 100.
	(max-inline-insns): set to 300.
	(min-inline-insns): set to 10.
	* tree-inline.c (struct inline_data): Rename inlined_stmts to
	inlined-insns.
	(INSNS_PER_STMT): Kill.
	(inlinable_function_p): Compute and store body size.
	(expand_call_inline): Likewise.
	(optimize_inline_calls): Likewise.

From-SVN: r69113
2003-07-09 00:31:20 +00:00
Mark Mitchell ee76b9314b cp-tree.h (build_scoped_method_call): Remove.
* cp-tree.h (build_scoped_method_call): Remove.
	(lookup_qualified_name): Remove parameter.
	(tsubst_copy_and_build): Declare.
	(finish_qualified_object_call_expr): Remove.
	(check_accessibility_of_qualified_id): New function.
	(finish_qualified_id_expr): Likewise.
	(non_reference): Likewise.
	(build_expr_from-tree): Remove.
	* call.c (non_reference): Remove.
	(build_scoped_method_call): Likewise.
	(build_method_call): Use error_operand_p.  Assert that we are not
	processing a template.
	(standard_conversion): Use non_reference.
	* class.c (build_vtbl_entry_ref): Likewise.
	(build_vtbl_ref_1): Likewise.
	* cvt.c (build_expr_type_conversion): Use non_reference.
	* decl.c (lookup_qualified_name): Remove flags parameter.
	(grok_op_properties): Use non_reference.
	* decl2.c (grok_array_decl): Likewise.
	(build_expr_from_tree): Remove.
	(build_offset_ref_call_from_tree): Update comment.
	* error.c (parm_to_string): Call reinit_global_formatting_buffer.
	* except.c (prepare_eh_types): Use non_reference.
	(can_convert_eh): Likewise.
	* init.c (build_dtor_call): Avoid using build_method_call.
	* mangle.c (write_template_param): Remove misleading comment.
	* method.c (locate_copy): Use non_reference.
	* parser.c (cp_parser_scope_through_which_access_occurs): Remove.
	(cp_parser_primary_expression): Do not create SCOPE_REFs is
	non-dependent contexts.
	(cp_parser_postfix_expression): Use finish_qualified_id_expr.
	(cp_parser_direct_declarator): Use tsubst_copy_and_build, not
	build_expr_from_tree.
	(cp_parser_lookup_name): Adjust call to lookup_qualified_name.
	Use check_accessibility_of_qualified_id.
	* pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
	build_expr_from_tree.
	(tsubst_baselink): New function.
	(tsubst_qualified_id): Likewise.
	(tsubst_copy): Use them.  Remove support for METHOD_CALL_EXPR.
	(tsubst_expr): Adjust call to lookup_qualified_name.
	(tsubst_copy_and_build): Handle SCOPE_REFs specially.  Adjust
	handling of CALL_EXPRs.
	(value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
	* rtti.c (get_tinfo_decl_dynamic): Use non_reference.
	* search.c (check_final_overrider): Likewise.
	* semantics.c (check_accessibility_of_qualified_id): New function.
	(finish_qualified_object_call_expr): Remove.
	* typeck.c (target_type): Use non_reference.
	(cxx_sizeof_or_alignof_type): Likewise.
	(dubious_conversion_warnings): Likewise.
	(convert_for_initialization): Likewise.
	(non_reference): New function.

From-SVN: r69063
2003-07-08 01:38:44 +00:00
Andreas Jaeger 5671bf2771 genextract.c: Convert remaining prototypes to ISO C90.
2003-07-07  Andreas Jaeger  <aj@suse.de>

	* genextract.c: Convert remaining prototypes to ISO C90.

	* cpplex.c (_cpp_free_buff): Convert prototype to ISO C90.
	* fold-const.c (fold_single_bit_test): Likewise.
	* diagnostic.c (default_diagnostic_finalizer): Likewise.
	* cfgrtl.c (rtl_redirect_edge_and_branch): Likewise.

	* gengtype.c (write_array): Generate ISO C90 prototypes.

	* genflags.c (gen_proto): Generate ISO C90 prototypes.


For cp:
2003-07-07  Andreas Jaeger  <aj@suse.de>

	* friend.c: Convert to ISO C90 prototypes.

	* Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
	language.
	* cfns.h: Regenerate.

	* typeck.c: Convert remaining prototypes to ISO C90.
	* search.c: Likewise.

	* decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
	* semantics.c (expand_or_defer_fn): Likewise
	* mangle.c (discriminator_for_string_literal): Likewise.
	* g++spec.c (lang_specific_driver): Likewise.

	* search.c (lookup_base_r): Remove unused variable.

From-SVN: r69050
2003-07-07 21:11:59 +02:00
Kazu Hirata 9bcb9aae27 call.c: Fix comment formatting.
* call.c: Fix comment formatting.
	* class.c: Likewise.
	* cp-tree.h: Likewise.
	* decl.c: Likewise.
	* decl2.c: Likewise.
	* error.c: Likewise.
	* method.c: Likewise.
	* name-lookup.c: Likewise.
	* parser.c: Likewise.
	* pt.c: Likewise.
	* rtti.c: Likewise.
	* search.c: Likewise.
	* typeck.c: Likewise.

From-SVN: r69022
2003-07-06 23:23:46 +00:00
Kazu Hirata 34cd5ae762 call.c: Fix comment typos.
* 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
2003-07-05 03:02:05 +00:00