Commit Graph

327 Commits

Author SHA1 Message Date
Mark Mitchell 6eabb2412f extend.texi (C++ Signatures): Remove node.
* extend.texi (C++ Signatures): Remove node.
	* invoke.texi: Remove discussion of -fhandle-signatures,
	signature, sigof, __signature__, and __sigof__.

	* Make-lang.in (CXX_SRCS): Remove sig.c.
	* Makefile.in (CXX_OBJS): Remove sig.o.
	(sig.o): Remove.
	* cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
	(CPTI_SIGNATURE_TYPE): Likewise.
	(CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
	(opaque_type_node): Likewise.
	(signature_type_node): Likewise.
	(sigtable_entry_type): Likewise.
	(flag_handle_signatures): Likewise.
	(lang_type): Remove is_signature, is_signature_pointer,
	is_signature_reference, has_opaque_typedecls,
	sigtables_has_been_generated.  Adjust dummy.  Remove signature,
	signature_pointer_to, signature_reference_to.
	(IS_SIGNATURE): Remove.
	(SET_SIGNATURE): Remove.
	(CLEAR_SIGNATURE): Remove.
	(IS_SIGNATURE_POINTER): Remove.
	(IS_SIGNATURE_REFERENCE): Remove.
	(SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
	(SIGTABLE_HAS_BEEN_GENERATED): Remove.
	(CLASSTYPE_SIGNATURE): Remove.
	(SIGNATURE_TYPE): Remove.
	(SIGNATURE_METHOD_VEC): Remove.
	(SIGNATURE_POINTER_TO): Remove.
	(SIGNATURE_REFERENCE_TO): Remove.
	(lang_decl_flags): Remove is_default_implementation.  Rename
	memfunc_pointer_to to saved_tree.
	(IS_DEFAULT_IMPLEMENTATION): Remove.
	(DECL_MEMFUNC_POINTER_TO): Remove.
	(DECL_MEMFUNC_POINTING_TO): Remove.
	(DECL_SAVED_TREE): Adjust definition.
	(tag_types): Remove signature_type_node.
	(SIGNATURE_FIELD_NAME): Remove.
	(SIGNATURE_FIELD_NAME_FORMAT): Likewise.
	(SIGNATURE_OPTR_NAME): Likewise.
	(SIGNATURE_SPTR_NAME): Likewise.
	(SIGNATURE_POINTER_NAME): Likewise.
	(SIGNATURE_POINTER_NAME_FORMAT): Likewise.
	(SIGNATURE_REFERENCE_NAME): Likewise.
	(SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
	(SIGTABLE_PTR_TYPE): Likewise.
	(SIGTABLE_NAME_FORMAT): Likewise.
	(SIGTABLE_NAME_FORMAT_LONG): Likewise.
	(SIGTABLE_TAG_NAME): Likewise.
	(SIGTABLE_VB_OFF_NAME): Likewise.
	(SIGTABLE_VT_OFF_NAME): Likewise.
	(finish_base_specifiers): Change prototype.
	(build_signature_pointer_type): Remove.
	(build_signature_reference_type): Remove.
	(build_signature_pointer_constructor): Remove.
	(build_signature_method_call): Remove.
	(build_optr_ref): Likewise.
	(append_signature_fields): Likewise.
	(signature_error): Likewise.
	* call.c (build_this): Remove signature support.
	(build_over_call): Likewise.
	(build_new_method_call): Likewise.
	* class.c (add_implicitly_declared_members): Likewise.
	(finish_struct_1): Likewise.
	(finish_struct): Likewise.
	* cvt.c (cp_convert_to_pointer): Likewise.
	(convert_to_pointer_force): Likewise.
	(ocp_convert): Likewise.
	* decl.c (sigtable_decl_p): Remove.
	(init_decl_processing): Remove support for signatures.
	(cp_finish_decl): Likewise.
	(grokdeclarator): Likewise.
	(grokparms): Likewise.
	(xref_tag): Likewise.
	(start_function): Likewise.
	(start_method): Likewise.
	* decl2.c (finish_sigtable_vardecl): Remove.
	(flag_handle_signatures): Remove.
	(lang_f_options): Remove handle-signatures.
	(grokfield): Remove support for signatures.
	(grokbitfield): Likewise.
	(finish_file): Likewise.
	(reparse_absdcl_as_casts): Likewise.
	* error.c (dump_type_real): Likewise.
	(dump_function_decl): Likewise.
	* friend.c (make_friend_class): Likewise.
	* gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
	* hash.h: Regenerated.
	* init.c (build_new_1): Remove support for signatures.
	* lang-options.h: Remove -fhandle-signatures,
	-fno-handle-signatures.
	* lex.c (init_parse): Remove support for signatures.
	(yyprint): Likewise.
	* lex.h (rid): Remove RID_SIGNATURE.
	* method.c (build_decl_overload_real): Remove support for
	signatures.
	(hack_identifier): Likewise.
	* parse.y (base_class): Likewise.
	(base_class.1): Likewise.
	(access_specifier): Likewise.
	* search.c (lookup_member): Likewise.
	* semantics.c (finish_qualified_object_call_expr): Likewise.
	(finish_template_type_parm): Likewise.
	(begin_class_definition): Likewise.
	(finish_base_specifier): Likewise.
	* sig.c: Remove.
	* tree.c (build_cplus_method_type): Remove support for signatures.
	* typeck.c (require_complete_type): Likewise.
	(c_sizeof): Likewise.
	(c_alignof): Likewise.
	(build_object_ref): Likewise.
	(build_component_ref): Likewise.
	(build_indirect_ref): Likewise.
	(build_c_cast): Likewise.
	(build_modify_expr): Likewise.
	(convert_for_initialization): Likewise.
	* typeck2.c (signature_error): Remove.
	(store_init_value): Remove support for signatures.
	(digest_init): Likewise.
	(build_x_arrow): Likewise.
	(build_functional_cast): Likewise.
	* xref.c (GNU_xref_decl): Likewise.

From-SVN: r28677
1999-08-11 20:22:41 +00:00
Martin v. Loewis d82d65d886 decl2.c (set_decl_namespace): Do not complain about non-matching decls if processing a template.
* decl2.c (set_decl_namespace): Do not complain about non-matching
	decls if processing a template.

From-SVN: r28649
1999-08-10 16:58:24 +00:00
Bernd Schmidt 49ad7cfa7a Include function.h in most files.
Include function.h in most files.  Remove most of the global variables
duplicated in function.h.  Add accessor macros for them which access
current_function.  Delete INLINE_HEADER rtx and related code, replace
with code using struct function to store inlining related data.

From-SVN: r28626
1999-08-09 14:00:21 +00:00
Kaveh R. Ghazi 9c0758dde6 class.c (count_fields, [...]): Add static prototype.
* class.c (count_fields, add_fields_to_vec): Add static prototype.

	* cp-tree.h (opname_tab, assignop_tab, operator_name_string,
	get_id_2, composite_pointer_type, dump_node_to_file): Constify a
	char*.

	* decl.c (named_label_list, cp_finish_decl, grokdeclarator):
	Constify a char*.

	* decl2.c (finish_static_data_member_decl, grokfield): Constify a
	char*.

	* dump.c (queue_and_dump_index, dump_int, dump_string,
	dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
	a char*.
	(dump_stmt): Add static prototype.

	* errfn.c (cp_thing): Constify a char*.

	* error.c (dump_unary_op, dump_binary_op, aggr_variety,
	dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
	dump_expr): Constify a char*.

	* lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
	read_line_number): Add static prototype.
	(opname_tab, assignop_tab, operator_name_string): Constify a char*.
	(real_yylex): Move label `letter' into the scope where it is used.

	* method.c (build_mangled_template_parm_index, build_overload_int,
	build_decl_overload_real, get_id_2): Constify a char*.

	* search.c (check_final_overrider): Make static.

	* typeck.c (composite_pointer_type): Constify a char*.

From-SVN: r28588
1999-08-07 22:28:52 +00:00
Jason Merrill 6ad073329c decl.c (lookup_name_real): Set the complain flag if we're looking for a namespace member.
* decl.c (lookup_name_real): Set the complain flag if we're
	looking for a namespace member.

	* lex.c (real_yylex): We can have a number with no digits.

	* cvt.c (cp_convert_to_pointer): Don't force pmf conversions.

	* search.c (binfo_from_vbase): New fn.
	* cp-tree.h: Declare it.
	* cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
	from pointer to member of virtual base.
	* typeck.c (get_delta_difference): Likewise.

From-SVN: r28560
1999-08-06 21:01:54 -04:00
Jason Merrill 074917ba5c lex.c (yyprint): Handle PFUNCNAME.
* lex.c (yyprint): Handle PFUNCNAME.

	* decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
	build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.

From-SVN: r28467
1999-08-03 06:18:13 -04:00
Mark Mitchell f71f87f9eb invoke.texi (-fdump-translation-unit): New option.
* invoke.texi (-fdump-translation-unit): New option.
	* Make-lang.in (CXX_SRCS): Add dump.c.
	* Makefile.in (CXX_OBJS): Add dump.o.
	(dump.o): New target.
	* cp-tree.h (DECL_CONV_FN_P): Document.
	(DECL_OVERLOADED_OPERATOR_P): New function.
	(TYPE_PTRMEM_CLASS_TYPE): New macro.
	(TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
	(PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
	(ASM_VOLATILE_P): New macro.
	(STMT_LINENO): Likewise.
	(cp_namespace_decls): New function.
	(dump_node_to_file): New function.
	* decl.c (cp_namespace_decls): New function.
	(walk_namespaces_r): Use it.
	(wrapup_globals_for_namespace): Likewise.
	* decl2.c (flag_dump_translation_unit): New variable.
	(lang_decode_option): Handle -fdump-translation-unit.
	(finish_file): If flag_dump_translation_unit is set, dump the
	translation unit.
	* dump.c: New file.
	* lang-options.h: Add -fdump-translation-unit.
	* pt.c (tsubst_template_parms): Robustify.
	(tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
	(tsubst_expr): Use STMT_LINENO.
	* semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
	for invalid cv-qualifiers even while building templates.

From-SVN: r28434
1999-08-03 01:37:47 +00:00
Mark Mitchell 83f2ccf4f8 cp-tree.h (BINFO_VIRTUALS): Document new format.
* cp-tree.h (BINFO_VIRTUALS): Document new format.
	* class.c (modify_one_vtable): Change prototype accordingly.
	(modify_all_vtables): Likewise.
	(modify_all_direct_vtables): Likewise.
	(modify_all_indirect_vtables): Likewise.
	(build_vtable_entry_for_fn): New function.
	(set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
	(modify_vtable_entry): Likewise.
	(add_virtual_function): Likewise.
	(build_vtbl_initializer): New function.
	(finish_vtbls): Simplify for new BINFO_VIRTUALS format.
	(fixup_vtable_deltas1): Likewise.
	(fixup_vtable_deltas): Likewise.
	(override_one_vtable): Likewise.
	(finish_struct_1): Likewise.
	* error.c (dump_expr): Likewise.
	* search.c (get_abstract_virtuals_1): Likewise.
	(get_abstract_virtuals): Likewise.
	(expand_upcast_fixups): Likewise.
	* tree.c (debug_binfo): Likewise.
	* decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
	__pure_virtual here.

From-SVN: r28298
1999-07-27 18:15:21 +00:00
Bernd Schmidt 7f4edbcba6 c-common.h: New file.
* c-common.h: New file.
	* c-common.c (permanent_obstack): Delete unused declaration.
	(c_global_trees): New array.
	(c_common_nodes_and_builtins): New function; split off common code
	from init_decl_processing in both c-decl.c and cp/decl.c.
	* c-tree.h: Delete lots of declarations of tree nodes; replaced by
	c_global_trees and accessor macros defined in c-common.h.
	Include c-common.h.
	* c-decl.c: Delete definitions for tree nodes that were replaced by
	c_global_trees.
	(init_decl_processing): Build void_list_node.
	Call c_common_nodes_and_builtins; delete code to generate the common
	builtins here.

	* objc/objc-act.c (build_module_descriptor): Rename variable
	void_list_node to avoid clash with c-common.h.

	* cp/cp-tree.h: Delete lots of declarations of tree nodes; replaced by
	c_global_trees and accessor macros defined in c-common.h.
	(cp_tree_index): New enumeration.
	(cp_global_trees): Declare new array.  Add accessor macros for it, and
	delete declarations of tree nodes replaced by it.
	(builtin_function): Delete macro, add declaration for new function.
	Include c-common.h.
	* cp/decl.c: Delete definitions for tree nodes that were replaced by
	cp_global_trees and c_global_trees.
	(init_decl_processing): Call c_common_nodes_and_builtins; delete code
	to generate the common builtins here.
	(builtin_function): New function.
	* cp/decl2.c (abort_fndecl): Delete declaration.
	* cp/except.c (expand_builtin_return_address): Delete declaration.
	(builtin_return_address_fndecl): Delete variable.
	(const_ptr_type_node): Delete declaration.
	* cp/lex.c (cons_up_default_function): Delete declaration of
	void_list_node.
	* cp/parse.y (void_list_node): Delete declaration.
	* cp/rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
	Delete variables.
	(const_string_type_node): Delete declaration.
	* cp/search.c (abort_fndecl): Delete declaration.

	* Makefile.in: Update dependencies.
	* objc/Make-lang.in: Likewise.
	* cp/Makefile.in: Likewise.

From-SVN: r28188
1999-07-20 10:41:10 +00:00
Jason Merrill 1d02ac8371 decl2.c (reparse_absdcl_as_casts): Don't warn about old-style casts in system headers or extern "C" blocks.
* decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
	casts in system headers or extern "C" blocks.
	* decl2.c (write_virtuals): Deleted declaration.
	* cp-tree.h (write_virtuals): Deleted extern declaration.
	* class.c (finish_struct_1): Removed #if 0'd code that mentions
	write_virtuals.
	* semantics.c (begin_class_definition): Rewrite code to not depend
	on write_virtuals.
	* lex.c (cp_pragma_interface): New function.
	(cp_pragma_implementation): Likewise.
	(handle_cp_pragma): Call them.

From-SVN: r28045
1999-07-09 08:44:37 -04:00
Alexandre Oliva db39aa0b8d * decl2.c (mark_vtable_entries): Fix check for rtti offset.
From-SVN: r27978
1999-07-06 18:32:23 -06:00
Mark Mitchell 1b5f5f763a decl2.c (import_export_decl): Use same_type_p, rather than relying on pointer-equality for types.
* decl2.c (import_export_decl): Use same_type_p, rather than
	relying on pointer-equality for types.
	* method.c (do_build_copy_constructor): Simplify.

From-SVN: r27555
1999-06-16 17:48:05 +00:00
Mark Mitchell 5e65d3ee9a decl2.c (mark_vtable_entries): Don't make a copy of a function, and then make it look like `abort'.
* decl2.c (mark_vtable_entries): Don't make a copy of a function,
	and then make it look like `abort'.  Just use `abort' instead.

From-SVN: r27131
1999-05-24 23:38:55 +00:00
Mark Mitchell 8bcc97de27 decl.c (lookup_tag): Remove code no longer needed after name-lookup improvements.
* decl.c (lookup_tag): Remove code no longer needed after
	name-lookup improvements.
	* decl2.c (handle_class_head): Make error-recovery more robust.
	* friend.c (make_friend_class): Reject templated typename types.
	* lex.c (is_global): A template parameter isn't global.
	* parse.y (class_head): Robustify.
	* parse.c: Regenerated.

From-SVN: r27117
1999-05-24 00:47:01 +00:00
Mark Mitchell c472cdfd0a decl2.c (start_static_storage_duration_function): Fix comment.
* decl2.c (start_static_storage_duration_function): Fix comment.
	(finish_file): Create static storage duration functions lazily.

From-SVN: r27029
1999-05-19 11:24:18 +00:00
Jason Merrill 6bdb8141ec Implement anonymous structs.
* cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
	* class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
	* class.c (finish_struct_1): Remove redundant check for anon struct.
	* decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
	(check_tag_decl): Check for anonymous struct here.
	* decl2.c (build_anon_union_vars): Catch anon struct at file scope.
	* init.c (sort_member_init, emit_base_init): Handle getting fields
	as well as names in current_member_init_list.
	(perform_member_init): Handle getting an anon aggr.
	* method.c (do_build_assign_ref): Don't descend into anon aggrs.
	(do_build_copy_constructor): Likewise.

From-SVN: r27027
1999-05-19 06:44:22 -04:00
Mark Mitchell 74322f31ce decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that indicate a reference to a field that is a qualified name.
* decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
	indicate a reference to a field that is a qualified name.

From-SVN: r26956
1999-05-16 23:46:40 +00:00
Jason Merrill 7a8f9fa9cf decl2.c (finish_objects): Don't use .?tors.* if we don't have ASM_OUTPUT_CONSTRUCTOR.
* decl2.c (finish_objects): Don't use .?tors.* if we don't have
	ASM_OUTPUT_CONSTRUCTOR.
	* friend.c (do_friend): Add attrlist arg.  Remove support for
	getting a non-decl as 'decl'.
	* decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
	rtl.
	(grokdeclarator): Adjust.
	* cp-tree.h: Adjust.
	* parse.y (direct_new_declarator): Make the first one a
	nonmomentary_expr, too.
	* init.c (build_new): suspend_momentary while we're calculating
	the size.
	(build_new_1): Don't copy size.

From-SVN: r26952
1999-05-16 16:40:00 -04:00
Jason Merrill 05e0b2f47c init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
* init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
	Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
	(resolve_offset_ref): Don't handle a raw baselink.
	* cvt.c (build_expr_type_conversion): Likewise.
	* typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
	convert_for_initialization): Likewise.
	* class.c (instantiate_type): Handle seeing a baselink under an
	OFFSET_REF.
	* error.c (dump_expr): Likewise.
	* pt.c (for_each_template_parm): Likewise.
	(resolve_overloaded_unification): Likewise.
	* tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
	* typeck.c (expr_sizeof): Also complain about other permutations
	of overloaded functions.

From-SVN: r26861
1999-05-10 08:12:58 -04:00
Mark Mitchell b3f738dacc decl2.c (start_objects): Don't let static constructors and destructors get inlined.
* decl2.c (start_objects): Don't let static constructors and
	destructors get inlined.
	* parse.y (nested_name_specifier): Make sure ordinary types are
	complete, just like template types.
	* parse.c: Regenerated.
	* pt.c (check_explicit_specialization): Improve error messages.

From-SVN: r26780
1999-05-05 11:50:03 +00:00
Mark Mitchell 0352cfc868 class.c (build_vtable): Use build_lang_decl when building vtables, not just build_decl.
* class.c (build_vtable): Use build_lang_decl when building
	vtables, not just build_decl.
	(prepare_fresh_vtable): Likewise.
	* decl.c (wrapup_globals_for_namespace): Mark vtables as
	DECL_EXTERNAL when calling wrapup_global_declarations.
	* decl2.c (priority_info_s): Add initializations_p and
	destructions_p members.
	(finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
	when deciding what vtables to write out.
	(ssdf_decls): New variable.
	(ssdf_decls_used): Likewise.
	(start_static_storage_duration_function): Deal with being called
	multiple times.  Avoid inlining this function.
	(generate_inits_for_priority): Deal with reuse of priority map.
	(get_priority_info): Clear initializations_p and destructions_p.
	(do_static_initialization): Tweak comment.
	(do_static_destruction): Likewise.  Fix condition on sentries for
	destruction.
	(generate_ctor_or_dtor_function): Call all of the static storage
	duration functions.
	(generate_ctor_or_dtor_function_for_priority): Check
	initializations_p and destructions_p to see what priorities need
	initialization functions.
	(finish_file): Rework to generate multiple static storage duration
	functions, rather than just one.

From-SVN: r26713
1999-04-30 16:14:58 +00:00
Mark Mitchell 1a6580ec80 decl2.c (do_static_destruction): Remove obsolete FIXME comment.
* decl2.c (do_static_destruction): Remove obsolete FIXME comment.
	(finish_file): Indent comments properly.

From-SVN: r26703
1999-04-29 22:39:31 +00:00
Richard Henderson b94c0f4fea decl2.c (do_static_initialization): Call do_pending_stack_adjust.
* decl2.c (do_static_initialization): Call do_pending_stack_adjust.
        (do_static_destruction): Likewise.

From-SVN: r26700
1999-04-29 10:43:16 -07:00
Nathan Sidwell 7f477e818a cp-tree.h (TYPE_NOTHROW_P): New macro.
* cp-tree.h (TYPE_NOTHROW_P): New macro.
	* decl2.c (delete_sanity): Warn on deleting void *.
	* init.c (build_new_1): Use TYPE_NOTHROW_P.
	* typeck.c (c_expand_return): cp_pedwarn on returning NULL from
	throwing operator new.

From-SVN: r26692
1999-04-29 08:33:55 +00:00
Mark Mitchell 4cb02ea162 decl2.c (finish_file): Tweak handling of extern inlines so that they are not unnecessarily put out.
* decl2.c (finish_file): Tweak handling of extern inlines so that
	they are not unnecessarily put out.

From-SVN: r26606
1999-04-23 16:58:01 +00:00
Mark Mitchell 0aafb128c0 cp-tree.h (lang_decl_flags): Remove returns_first_arg and preserves_first_arg.
* cp-tree.h (lang_decl_flags): Remove returns_first_arg and
	preserves_first_arg.  Enlarge dummy accordingly.
	(DECL_TINFO_FN_P): New macro.
	(SET_DECL_TINO_FN_P): Likeiwse.
	(DECL_RETURNS_FIRST_ARG): Remove.
	(DECL_PRESERVES_THIS): Likewise.
	(DECL_INIT_PRIORITY): New macro.
	(finish_struct_1): Change prototype.
	(cat_namespace_levels): Remove prototype.
	(vtable_decl_p): New prototype.
	(vtype_decl_p): Likewise.
	(sigtable_decl_p): Likewise.
	(walk_globals_pred): New typedef.
	(walk_globals_fn): Likewise.
	(walk_globals): New prototype.
	(walk_namespaces_fn): New typedef.
	(walk_namespaces): New prototype.
	(wrapup_globals_for_namespace): Likewise.
	(walk_vtables): Remove prototype.
	(walk_sigtables): Likewise.
	(instantiate_pending_templates): New prototype.
	* class.c (finish_struct_1): Don't return a value.
	* decl.h (pending_statics): Remove declaration.
	* decl.c (walk_namespaces_r): New function.
	(walk_globals_r): Likewise.
	(vtable_decl_p): Likewise.
	(vtype_decl_p): Likewise.
	(sigtable_decl_p): Likewise.
	(walk_namespaces): Likewise.
	(walk_globals_data): New type.
	(walk_globals): New function.
	(wrapup_globals_for_namespace): Likewise.
	(expand_static_init): Remove assertion.  Remove redundancy in
	conditional.  Don't put static data members in static_aggregates
	Tidy.
	(finish_function): Remove redundancy in conditional.  Don't set
	DECL_RETURNS_FIRST_ARG.
	(cat_namespace_levels): Remove.
	* decl2.c: Include splay-tree.h and varray.h.
	(priority_info_s): New structure.
	(finish_vtable_vardecl): Change prototype.  Adjust for new calling
	conventions.
	(prune_vtable_vardecl): Likewise.
	(finish_sigtable_vardecl): Likewise.
	(setup_initp): Remove.
	(do_dtors): Remove.
	(do_ctors): Remove.
	(start_static_storage_duration_function): New function.
	(generate_inits_for_priority): Likewise.
	(finish_static_storage_duration_function): Likewise.
	(get_priority_info): Likewise.
	(do_static_initialization): Likewise.
	(do_static_destruction): Likewise.
	(do_static_initialization_and_destruction): Likewise.
	(generate_ctor_or_dtor_function): Likewise.
	(generate_ctor_and_dtor_functions_for_priority): Likewise.
	(pending_statics): Make it a varray.
	(pending_statics_used): New variable.
	(saved_inlines): Make it a varray.
	(saved_inlines_used): New variable.
	(finish_static_data_member): Change method of updating
	pending_statics.
	(mark_inline_for_output): Remove #if 0'd code.  Change method of
	updating saved_inlines.
	(walk_vtables): Remove.
	(walk_sigtables): Likewise.
	(import_export_decl): Use DECL_TINFO_FN_P.
	(pending_templates): Remove declaration.
	(maybe_templates): Likewise.
	(static_aggregates_initp): Likewise.
	(setup_initp): Likewise.
	(finish_objects): Simplify.
	(INITIALIZE_P_IDENTIFIER): New macro.
	(PRIORITY_IDENTIFIER): New macro.
	(SSDF_IDENTIFIER): New macro.
	(initialize_p_decl): New variable.
	(priority_decl): Likewise.
	(ssdf_decl): Likewise.
	(priority_info_map): Likewise.
	(finish_file): Recode output of static intializers and other
	file-scope finalization tasks.
	* error.c (OB_END_TEMPLATE_ID): New macro.
	(dump_type_real): Use it.
	(dump_decl): Likewise.
	(dump_function_name): Likewise.
	* lex.c (set_typedecl_interface_info): Adjust for new walk_globals
	interface.
	(check_newline): Use walk_globals, not walk_vtables.
	* pt.c (pending_tempalte_expansions): Remove.
	(set_vardecl_interface_info): Likewise.
	(pending_templates): Make static.
	(maybe_templates): Likewise.
	(instantiate_class_template): Adjust call to finish_struct_1.
	(instantiate_pending_templates): New function.
	* rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
	* tree.c (static_aggregates_initp): Remove.
	(cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
	instead.
	* Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.

From-SVN: r26594
1999-04-22 23:13:12 +00:00
Mark Mitchell 337c90cc04 cp-tree.h (build_binary_op): Remove unneeded parameter.
* cp-tree.h (build_binary_op): Remove unneeded parameter.
	* class.c (build_vrable_entry_ref): Adjust call to
	build_binary_op.
	* decl.c (expand_static_init): Likewise.
	(grokdeclarator): Likewise.
	(finish_function): Likewise.
	* decl2.c (delete_sanity): Likewise.
	(do_dtors): Likewise.
	(do_ctors): Likewise.
	* error.c (dump_type_suffix): Likewise.
	* expr.c (cplus_expand_expr): Likewise.
	* init.c (resolve_offset_ref): Likewise.
	(build_new): Likewise.
	(build_new_1): Likewise.
	(build_vec_delete_1): Likewise.
	(expand_vec_init_catch_clause): Likewise.
	(build_delete): Likewise.
	* pt.c (tsubst): Likewise.
	* rtti.c (synthesize_tinfo_fn): Likewise.
	* search.c (expand_upcast_fixups): Likewise.
	(expand_direct_vtbls_init): Likewise.
	* typeck.c (get_member_function_from_ptrfunc): Likewise.
	(build_binary_op_nodefault): Likewise.
	(point_int_sum): Likewise.
	(pointer_diff): Likewise.
	(build_unary_op): Likewise.
	(build_modify_expr): Likewise.
	(get_delta_difference): Likewise.
	(build_ptrmemfunc): Likewise.
	(expand_ptrmemfunc_cst): Likewise.

From-SVN: r26566
1999-04-20 21:48:52 +00:00
Jason Merrill 419c621259 decl.c (grokfndecl): Always call cplus_decl_attributes.
* decl.c (grokfndecl): Always call cplus_decl_attributes.
	* decl2.c (grokfield): Pass attrlist to grokdeclarator.

From-SVN: r26558
1999-04-19 21:20:07 -04:00
Mark Mitchell fa8d6e85a7 cp-tree.h (finish_static_data_member_decl): New function.
* cp-tree.h (finish_static_data_member_decl): New function.
	* decl2.c (finish_static_data_member_decl): Split out from ...
	(grokfield): Here.
	* pt.c (instantiate_class_template): Use it here instead of
	trying to fake it.
	(tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
	finish_static_data_member_decl will do that.  Explicit set
	DECL_EXTERNAL to match non-template processing.

From-SVN: r26548
1999-04-19 12:23:55 +00:00
Mark Mitchell 3d7de1fa03 cp-tree.h (lang_type): Add documentation.
* cp-tree.h (lang_type): Add documentation.
	* decl2.c (handle_class_head): Create template declarations here,
	as appropriate.
	* parse.y (class_head): Return whether or not we entered a new
	scope, as well as the type named.
	(named_class_head): Likewise.
	(named_complex_class_head_sans_basetype): Likewise.
	(structsp): Adjust accordingly.  Pop scope when required.
	* parse.c: Regenerated.
	* pt.c (check_default_tmpl_args): Robustify.
	(redeclare_class_template): Likewise.
	(instantiate_class_template): An instantiation of an
	anonymous union is itself an anonymous union.
	* semantics.c (begin_class_definition): Don't create template
	declarations here.

From-SVN: r26475
1999-04-15 17:52:25 +00:00
Mark Mitchell b74a056019 cp-tree.h (popclass): Change declaration.
* cp-tree.h (popclass): Change declaration.
	(pop_nested_class): Likewise.
	(poplevel_class): Remove declaration.
	* call.c (convert_default_argument): Pass no arguments to
	popclass.
	* class.c (finish_struct_1): Likewise.
	(finish_struct): Likewise.
	(popclass): Remove argument.  Simplify code accordingly.
	(pop_nested_class): Likewise.
	* decl.c (poplevel_class): Declare it here, and make it static.
	(poplevel): Handle class scopes.
	(pop_level_class): Don't take an rgument.  Simplify.
	(pop_everything): Pass no arguments to pop_nested_class.
	(cp_finish_decl): Pass no arguments to popclass.
	(grokdeclarator): Pass no arguments to pop_nested_class.
	(finish_function): Likewise.
	* decl2.c (grokfield): Likewise.
	(pop_scope): Pass no arguments to popclass.
	* lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
	* pt.c (instantiate_class_template): Move call to pushclass, and
	document.  Pass no arguments to popclass.
	(regenerate_decl_from_template): Likewise.

From-SVN: r26454
1999-04-14 13:20:19 +00:00
Martin v. Löwis 2de45c0679 extend.texi (Deprecated Features): New node.
* extend.texi (Deprecated Features): New node.
	* invoke.texi (-Wdeprecated): Document.
	* cp/lang-options.h (-Wdeprecated): New flag.
	* cp/decl2.c (warn_deprecated): New flag.
	(lang_decode_option): Deprecated this-is-variable,
	external-templates, alt-external-templates.
	Support -Wdeprecated.
	* cp/errfn.c (cp_deprecated): New function.

From-SVN: r26438
1999-04-14 05:34:55 +00:00
Jason Merrill 187e786433 decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead of the decls themselves.
* decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
	of the decls themselves.

From-SVN: r26435
1999-04-13 20:00:20 -04:00
Mike Stump 9c73ec8469 decl2.c (import_export_decl): Because vtables always reference virtual functions...
* decl2.c (import_export_decl): Because vtables always reference
	virtual functions, even if they are inlined, don't allow
	-fno-implement-inlines to not emit them, instead, emit them with
	the vtable.
	* decl.c (start_function): Likewise.
Fixes vtable1.C

From-SVN: r26416
1999-04-13 18:09:57 +00:00
Jason Merrill aff08c1864 cp-tree.h (struct lang_type): Add com_interface.
* cp-tree.h (struct lang_type): Add com_interface.
	(CLASSTYPE_COM_INTERFACE): New macro.
	* class.c (set_rtti_entry): COM interface classes have no RTTI
	entries in their vtables; adjust.
	(add_virtual_function, finish_base_struct, skip_rtti_stuff,
	modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
	finish_struct_1): Likewise.
	* decl2.c (mark_vtable_entries): Likewise.
	* rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
	* search.c (get_abstract_virtuals_1, get_abstract_virtuals,
	expand_upcast_fixups): Likewise.
	* tree.c (debug_binfo): Likewise.

From-SVN: r26394
1999-04-12 20:39:32 -04:00
Mark Mitchell 8f0327178b tinfo.h (__class_type_info): Fix illegal declaration.
1999-04-02  Mark Mitchell  <mark@codesourcery.com>
	* tinfo.h (__class_type_info): Fix illegal declaration.
	* cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
	* cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
	(IDENTIFIER_CLASS_VALUE): Improve documentation.
	(is_properly_derived_from): Declare.
	(invalidate_class_lookup_cache): Likewise.
	(maybe_maybe_note_name_used_in_class): Likewise.
	(note_name_declared_in_class): Likewise.
	(push_using_decl): Remove duplicate declaration.
	(id_in_current_class): Remove declaration.
	(push_class_binding): Change prototype.
	(clear_identitifer_class_values): Declare.
	* call.c (is_properly_derived_from): Make it global.
	(build_new_function_call): Be careful about updating candidates.
	(build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
	asked to make illegal calls.
	* class.c: Include splay-tree.h.
	(class_stack_node): Add names_used slot.
	(check_member_decl_is_same_in_complete_scope): Remove.
	(add_method): Fix comment.  Push the declaration into class
	scope.
	(finish_struct_1): When popping the class, pop the bindings too.
	Remove check for data member/function member conflict.
	(finish_struct): Remove calls to
	check_member_decl_is_same_in_complete_scope.  Change calls to
	popclass.
	(pushclass): Clear names_used in the class stack entry.
	Use invalidate_class_lookup_cache to remove cached entries, rather
	than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
	before entering a new class.  Remove dead code.  Don't mess with
	current_function_decl when pushing declarations.
	(invalidate_class_lookup_cache): New function, split out from ...
	(popclass): Here.  Clean up names_used on our way out.
	(instantiate_type): Adjust.
	(build_self_reference): Don't push the declaration here.
	(maybe_note_name_used_in_class): New function.
	(note_name_declared_in_class): Likewise.
	* decl.c (add_binding): Change prototype.
	(find_class_binding_level): New function.
	(innermost_nonclass_level): Likewise.
	(current_binding_level): Update documentation.
	(inner_binding_level): Remove.  Replace with current_binding_level
	throughout.
	(push_binding_level): Remove special handling of
	class_binding_level.
	(pop_binding_level): Likewise.  Use find_class_binding_level.
	(suspend_binding_level): Likewise.
	(global_bindings_p): Use innermost_nonclass_level.
	(toplevel_bindings_p): Likewise.
	(namespace_bindings_p): Likewise.
	(pseudo_global_level_p): Likewise.
	(push_binding): Clear INHERITED_VALUE_BINDING_P.
	(add_binding): Check for illegal multiple declarations.  Return a
	value indicating whether or not the new binding was legal.
	(push_local_binding): Skip over class binding levels.  Check
	return value from add_binding.
	(push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
	note_name_declared_in_class.
	(pushlevel_class): Remove "fake out the rest of the compiler"
	code.
	(poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
	(clear_identifier_class_values): New function.
	(pop_from_top_level): Use it.
	(pop_everything): Tweak.
	(maybe_process_template_type_declaration): Don't push the
	declaration for the template here.
	(pushtag): Don't push tag declarations into class scope here.
	(pushdecl): Apply DeMorgan's law for readability.
	(pushdecl_class_level): Remove special-case code for
	TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
	(push_class_level_bindng): Deal with inherited bindings.
	(lookup_name_real): Remove special-case code for
	TYPE_BEING_DEFINED, and some implicit typename magic.
	(grokdeclarator): Handle COMPONENT_REF for a template function.
	(build_enumerator): Don't call pushdecl_class_level here.
	(id_in_current_class): Remove.
	* decl2.c (grokfield): Don't call pushdecl_class_level or
	check_template_shadow.
	* errfn.c (cp_file_of): Don't declare.
	(cp_line_of): Likewise.
	* error.c (dump_decl): Handle an OVERLOAD.
	(cp_file_of): Likewise.
	(cp_line_of): Likewise.
	* init.c (build_member_call): Handle a COMPONENT_REF.
	* lex.c (do_identifier): Call maybe_note_name_used_in_class, not
	pushdecl_class_level.
	* method.c (hack_identifier): Build COMPONENT_REFs for references
	to member templates as well as member functions.  Remove dead
	code.
	* parse.y (left_curly): Remove.
	(nonnested_type): Call maybe_note_name_used_in_class, not
	pushdecl_class_level.
	* parse.c: Regenerated.
	(nested_name_specifier_1): Likewise.
	* pt.c (check_explicit_specialization): Adjust, for robustness.
	(check_template_shadow): Handle OVERLOADs.
	(build_template_decl): Set DECL_CONSTRUCTOR_P on the
	TEMPLATE_DECL, if appropriate.
	* search.c (envelope_add_decl): Remove.
	(dfs_pushdecls): Likewise.
	(dfs_compress_decls): Likewise.
	(dfs_push_decls): New function.
	(dfs_push_type_decls): Likewise.
	(setup_class_bindings): Likewise.
	(template_self_reference_p): Likewise.
	(lookup_field_r): Use it.
	(looup_member): Remove old comment.  Deal with ambiguity.
	(push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
	and remove envelope processing.
	* semantics.c (begin_class_definition): Let pushclass push
	declarations for base classes.
	(finish_member_declaration): Push declarations into class scope.
	* typeck.c (build_component_ref): Just put an OVERLOAD into the
	COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
	(build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
	* Makefile.in (class.o): Depend on splay-tree.h.

From-SVN: r26133
1999-04-02 15:36:57 +00:00
Jason Merrill 9af3a23b20 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
From-SVN: r26060
1999-03-29 11:13:51 -05:00
Kaveh R. Ghazi d8e178a02b Warning fixes:
* call.c (op_error): Const-ify a char*.
        (add_candidate, source_type, add_warning): Add static prototype.
        (print_z_candidates): Const-ify a char*.
        * class.c (resolve_address_of_overloaded_function,
        fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
        (get_vtable_name, finish_struct_1): Const-ify a char*.
        * cvt.c (convert_to_reference): Likewise.
        * decl.c (redeclaration_error_message, record_builtin_type,
        record_unknown_type, member_function_or_else, bad_specifiers):
        Likewise.
        (find_binding, select_decl, unqualified_namespace_lookup,
        lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
        Add static prototype.
        (warn_extern_redeclared_static, duplicate_decls, pushdecl,
        implicitly_declare, record_builtin_java_type, define_function,
        grok_op_properties, tag_name): Const-ify a char*.
        * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
        (define_function, finish_builtin_type): Const-ify a char*.
        (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
        cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
        (file_name_nondirectory): Const-ify a char*.
        (init_filename_times): Don't prototype.
        (compiler_error): Prototype.
        (yyerror, init_repo): Const-ify a char*.
        (build_srcloc): Don't prototype.
        (build_x_indirect_ref, build_indirect_ref, build_component_addr):
        Const-ify a char*.
        (warn_for_assignment): Don't prototype.
        (convert_for_initialization, readonly_error, check_for_new_type,
        GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
        Const-ify a char*.
        * decl2.c (acceptable_java_type, output_vtable_inherit,
        setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
        merge_functions, decl_namespace, validate_nonmember_using_decl,
        do_nonmember_using_decl): Add static prototype.
        (lang_f_options): Const-ify a char*.
        (finish_builtin_type): Likewise.
        (add_function, arg_assoc_namespace, arg_assoc_class): Add static
        prototype.
        * errfn.c: Include cp-tree.h.
        (cp_thing): Add static prototype.
        (compiler_error): Don't protoptype.
        (cp_compiler_error): Cast `compiler_error' to `errorfn' before
        passing it to `cp_thing'.
        * error.c (interesting_scope_p): Add static prototype.
        * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
        a char*.
        * init.c (compiler_error): Don't prototype.
        (member_init_ok_or_else): Const-ify a char*.
        (build_java_class_ref): Add static prototype.
        * lex.c (compiler_error): Don't prototype.
        (get_time_identifier, interface_strcmp, extend_token_buffer,
        handle_cp_pragma): Const-ify a char*.
        (is_global, init_filename_times): Add static prototype.
        (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
        (compiler_error): Change from fixed args to variable args.
        (yyerror): Const-ify a char*.
        * parse.y (cond_stmt_keyword): Const-ify a char*.
        (parse_decl): Add static prototype.
        * pt.c (template_args_equal, print_template_context): Likewise.
        (print_candidates, check_default_tmpl_args): Const-ify a char*.
        (instantiate_class_template): Likewise.
        * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
        * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
        expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
        * search.c (lookup_field_info, lookup_member): Likewise.
        (lookup_member): Cast the first argument of `bzero' to a PTR.
        * sig.c (compiler_error): Don't prototype.
        (build_signature_pointer_or_reference_nam): Const-ify a char*.
        (get_sigtable_name, build_member_function_pointer): Likewise.
        * tree.c (compiler_error): Don't prototype.
        (no_linkage_helper, build_srcloc): Add static prototype.
        (build_vbase_pointer_fields): Const-ify a char*.
        (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
        * typeck.c (compiler_error): Don't prototype.
        (convert_for_assignment): Const-ify a char*.
        (comp_cv_target_types): Add static prototype.
        (build_x_indirect_ref, build_indirect_ref, convert_arguments,
        build_component_addr, build_unary_op, convert_for_initialization):
        Const-ify a char*.
        * typeck2.c (ack): Add static prototype and change from fixed args
        to variable args.
        (readonly_error, check_for_new_type): Const-ify a char*.
        * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
        fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
        (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
        (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
        gen_assign, GNU_xref_member): Const-ify a char*.

From-SVN: r25994
1999-03-26 07:45:00 +00:00
Jason Merrill 2f435bed98 * decl2.c (comdat_linkage): Treat vtables like functions.
From-SVN: r25985
1999-03-25 14:45:25 -05:00
Jason Merrill ea735e02ae decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
* decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
	* decl.c (expand_static_init): Make sure we don't add any after
	then.
	* decl.c (cp_finish_decl): Move intelligence about handling
	DECL_COMDAT for variables from here...
	* decl2.c (comdat_linkage): ...to here.
	(maybe_make_one_only): Tweak.
	(import_export_decl): Call comdat_linkage for variables, too.
	(finish_file): Handle template statics properly.

From-SVN: r25920
1999-03-22 21:33:34 -05:00
Mark Mitchell b5d51daa7e decl2.c (validate_nonmember_using_decl): Issue sensible error-messages on bogus qualifiers.
* decl2.c (validate_nonmember_using_decl): Issue sensible
	error-messages on bogus qualifiers.

From-SVN: r25781
1999-03-15 13:08:26 +00:00
Martin v. Löwis c592d5d258 decl.c (select_decl): Allow class templates when we need types.
* decl.c (select_decl): Allow class templates when we need types.
        * decl2.c (ambiguous_decl): Likewise.

From-SVN: r25737
1999-03-12 23:17:05 +00:00
Jason Merrill 3c2a009706 decl2.c (setup_initp): Give statics with no priority the default priority here.
* decl2.c (setup_initp): Give statics with no priority the default
	priority here.
	(do_dtors, do_ctors, finish_file): Remove special handling of
	non-prioritized statics.

From-SVN: r25613
1999-03-05 22:54:30 -05:00
Jason Merrill e9659ab02f class.c, [...]: Add 'static' to make SunOS 4 cc happy.
* class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
	cc happy.
	* decl2.c (import_export_class): Also return if
	CLASSTYPE_INTERFACE_ONLY is set.

From-SVN: r25562
1999-03-03 06:24:45 -05:00
Martin v. Löwis 0580c9aa4c decl.c (push_overloaded_decl): Only overwrite the old binding if there was one.
* decl.c (push_overloaded_decl): Only overwrite the old binding if
	there was one.
	* decl2.c (do_local_using_decl): Fix loop termination.

From-SVN: r25560
1999-03-03 11:22:42 +00:00
Nathan Sidwell 6654316990 typeck.c (complete_type_or_else): Add VALUE arg, for helpful diagnostics.
* typeck.c (complete_type_or_else): Add VALUE arg, for helpful
	diagnostics.
	cp-tree.h (complete_type_or_else): Added VALUE parameter.
	* init.c (build_new_1): Extra arg to complete_type_or_else.
	(build_delete): Likewise.
	* typeck.c (require_complete_type): Likewise.
	(pointer_int_sum): Likewise.
	(pointer_diff): Likewise.
	(build_component_ref): Likewise.
	* typeck2.c (incomplete_type_error): Always use cp_error.
	Show declaration of undefined type, if appropriate.
	Deal with UNKNOWN_TYPE nodes.
	* typeck.c (require_complete_type): Use TYPE_SIZE as
	size_zero_node to mean incomplete type.
	(require_complete_type_in_void): New function.
	(build_compound_expr): Call complete_type_in_void for LHS.
	(build_c_cast): Call complete_type_in_void for void cast.
	* cvt.c (ocp_convert): Call complete_type_in_void for void cast.
	* decl.c (cplus_expand_expr_stmt): Void expression checks moved to
	require_complete_type_in_void. Call it.
	* cp-tree.h (require_complete_type_in_void): Prototype new function.
	* typeck.c (convert_arguments): Use alternative format for function
	decls. Don't require_complete_type here. Simplify diagnostic printing.
	(convert_for_initialization): Don't require_complete_type on RHS yet.
	* call.c (convert_arg_to_ellipsis): Call require_complete_type.
	* call.c (build_over_call): Cope with qualified void return type.
	* semantics.c (finish_call_expr): Likewise
	* typeck.c (build_function_call_real): Likewise
	(c_expand_return): Likewise
	* decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
	* call.c (print_z_candidates): Use alternate print format, to be
	consistant with (pt.c) print_candidates.
	method.c (hack_identifier): List candidate members.
	search.c (lookup_field): Build ambiguous list, and show it, if
	ambiguous.

From-SVN: r25474
1999-02-26 18:37:04 -05:00
Jason Merrill b262d64c12 typeck.c (convert_for_assignment): Allow boolean integral constant expressions to convert to null pointer.
* typeck.c (convert_for_assignment): Allow boolean integral constant
	expressions to convert to null pointer.
	* decl.c (lookup_namespace_name): Resolve namespace aliases.
	* class.c (push_nested_class): Allow namespaces.
	* decl2.c (set_decl_namespace): Add friendp parameter.
	* decl.c (grokfndecl): Pass it.
	(grokvardecl): Likewise.
	* cp-tree.h: Change declaration.

From-SVN: r25420
1999-02-24 19:11:35 -05:00
Jeffrey A Law 14686fcda5 tm.texi: Update docs for constructors and destructors.
* tm.texi: Update docs for constructors and destructors.
And update comment in cp/decl2.c

From-SVN: r25356
1999-02-21 12:58:22 -07:00
H.J. Lu b4bb92e52f decl2.c (start_objects): Make file scope constructors and destructors local to the file if...
* decl2.c (start_objects): Make file scope constructors and
        destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
        ASM_OUTPUT_DESTRUCTOR are defined.

From-SVN: r25354
1999-02-21 12:42:18 -07:00
Mark Mitchell 0301787454 cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
1999-02-19  Mark Mitchell  <mark@markmitchell.com>
	* cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
	(fn_type_unification): Adjust prototype.
	(lookup_fnfields_1): Declare.
	* call.c (add_template_candidate_real): Adjust call to
	fn_type_unification.
	* class.c (add_method): Don't allow duplicate declarations of
	constructors or destructors.
	(resolve_address_of_overloaded_function): Remove unused variable.
	Adjust call to fn_type_unification.
	* decl.c (grokfndecl): Be more robust in the face of illegal
	specializations.
	* decl2.c (check_classfn): Remove hokey handling of member
	templates.
	* pt.c (determine_specialization): Improve comments.  Adjust to
	handle template argument deduction as per the standard.
	(check_explicit_specialization): Fix comment spacing.  Handle
	type-conversion operators correctly.  Improve error-recovery.
	(fn_type_unification): Remove EXTRA_FN_ARG parameter.
	(get_bindings_real): Simplify handling of static members.
	* search.c (lookup_fnfields_1): Make it have external linkage.
	* typeck.c (compparms): Fix comment.
	(build_unary_op): Don't try to figure out which template
	specialization is being referred to when when the address-of
	operator is used with a template function.

From-SVN: r25347
1999-02-21 16:38:23 +00:00