Commit Graph

273 Commits

Author SHA1 Message Date
Theodore Papadopoulo 0daa67d1d6 * decl2.c (lang_decode_option): Use read_integral_parameter.
From-SVN: r24986
1999-02-02 14:47:20 -07:00
Zack Weinberg be163a70f5 flags.h: Declare flag_no_ident.
1999-01-31 17:52 -0500  Zack Weinberg  <zack@midnite.ec.rhno.columbia.edu>
	* flags.h: Declare flag_no_ident.
	* toplev.c: Define flag_no_ident.  Process -f(no-)ident here.
	* c-decl.c: Don't define flag_no_ident.  Don't process
          -f(no-)ident switches here.
	* ch/decl.c: Likewise.
	* cp/decl2.c: Likewise.
	* c-tree.h: Don't declare flag_no_ident.
	* ch/ch-tree.h: Likewise.
	* cp/cp-tree.h: Likewise.
	* config/elfos.h (ASM_FILE_END): Output final .ident directive
          only if !flag_no_ident.
	* config/ptx4.h: Likewise.
	* config/svr4.h: Likewise.
	* config/alpha/elf.h: Likewise.
	* config/arm/linux-elf.h: Likewise.
	* config/i386/sco5.h: Likewise.
	* config/i860/fx2800.h: Likewise.
	* config/mips/gnu.h: Likewise.
	* config/i386/osfrose.h: Likewise.
	* gcc.c (C specs): Map -Qn to -fno-ident.
	* ch/lang-specs.h: Likewise.
	* cp/lang-specs.h: Likewise.
	* f/lang-specs.h: Likewise.
	* objc/lang-specs.h: Likewise.
	* java/lang-specs.h: Likewise.

From-SVN: r24943
1999-01-31 17:46:42 +00:00
Jason Merrill 0034cf7299 tree.c (equal_functions): Fix name in prototype.
* tree.c (equal_functions): Fix name in prototype.
	* decl.c (push_local_binding): Add FLAGS argument.
	(pushdecl, push_overloaded_decl): Pass it.
	* decl2.c (do_local_using_decl): Likewise.
	* cp-tree.h: Adjust prototype.
	* decl.c (poplevel): Fix logic.

From-SVN: r24869
1999-01-25 21:33:46 -05:00
Jason Merrill 1f90179302 decl.c (start_function): Make member functions one_only on windows.
* decl.c (start_function): Make member functions one_only on windows.
	* decl2.c (import_export_decl): Likewise.
	* decl.c (grokdeclarator): Don't complain about implicit int in
	a system header.  Change same-name field check to not complain in
	a system header instead of within extern "C".

From-SVN: r24839
1999-01-23 19:59:21 -05:00
Mark Mitchell 7bdbfa05db cp-tree.h (PUSH_GLOBAL): New macro.
* cp-tree.h (PUSH_GLOBAL): New macro.
	(PUSH_LOCAL): Likewise.
	(PUSH_USING): Likewise.
	(namespace_bindings_p): Declare.
	(push_overloaded_decl): Likewise.
	* decl.c (push_overloaded_decl): Don't make it static.  Check for
	illegal declarations after using declarations here.
	(namespace_bindings_p): Likewise.
	(duplicate_decls): Don't consider declarations from different
	namespaces to be the same.
	(pushdecl): Use symbolic PUSH_ constants in calls to
	push_overloaded_decl.
	(push_overloaded_decl_1): Likewise.
	* decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
	(do_nonmember_using_decl): Check for illegal using declarations
	after ordinary declarations here.
	(do_local_using_decl): Call pushdecl to insert declarations.

From-SVN: r24812
1999-01-21 21:16:22 +00:00
Jason Merrill e2213efb9d decl2.c (finish_vtable_vardecl): Make vtables comdat here.
* decl2.c (finish_vtable_vardecl): Make vtables comdat here.
	(import_export_vtable): Not here.

From-SVN: r24761
1999-01-19 06:14:54 -05:00
Jason Merrill ddaed37e04 typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up definition of 'casting away const' in reinterpret_cast<>.
* typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
	definition of 'casting away const' in reinterpret_cast<>.
	* cvt.c: Add include for decl.h, remove extern for
	static_aggregates which is now provided by decl.h.
	* Makefile.in (cvt.o): Add dependency for decl.h and missing
	dependencies for convert.h and flags.h.
	* decl2.c (do_dtors): Set current location to that of the
	decl, for sensible diagnostics and debugging.
	(check_classfn): Issue `incomplete type' error, if
	class is not defined.
	* cp-tree.h: Add prototype for bound_pmf_p.

From-SVN: r24748
1999-01-18 07:49:20 -05:00
Jason Merrill ad236eab58 re PR other/18132 (Problem compiling gcc 3.4.2)
* semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
PR 18132
	* decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
	that we don't suppress the other copies.
	* lex.c (handle_cp_pragma): Likewise.
PR 18627

From-SVN: r24662
1999-01-14 05:42:12 -05:00
Mark Mitchell d8f8dca15f class.c (pushclass): Tweak handling of class-level bindings.
* class.c (pushclass): Tweak handling of class-level bindings.
	(resolve_address_of_overloaded_function): Update pointer-to-member
	handling.
	(instantiate_type): Likewise.
	* cvt.c (cp_convert_to_pointer): Likewise.
	* decl.c (pop_binding): Take the DECL to pop, not just the name.
	Deal with `struct stat' hack.
	(binding_level): Add to documentation.
	(push_binding): Clear BINDING_TYPE.
	(add_binding): New function.
	(push_local_binding): Use it.
	(push_class_binding): Likewise.
	(poplevel): Adjust calls to pop_binding.
	(poplevel_class): Likewise.
	(pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
	declarations to current binding level.
	(push_class_level_binding): Likewise.
	(push_overloaded_decl): Adjust handling of OVERLOADs in local
	bindings.
	(lookup_namespace_name): Don't crash when confronted with a
	TEMPLATE_DECL.
	(lookup_name_real): Do `struct stat' hack in local binding
	contexts.
	(build_ptrmemfunc_type): Adjust documentation.
	(grokdeclarator): Don't avoid building real array types when
	processing templates unless really necessary.
	(finish_method): Adjust calls to pop_binding.
	* decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
	not reparse_decl_as_expr.
	(build_expr_from_tree): Deal with a template-id as the function to
	call in a METHOD_CALL_EXPR.
	* pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
	(maybe_adjust_types_For_deduction): Don't do peculiar things with
	METHOD_TYPEs here.
	(resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
	pointer-to-member types where necessary.
	* tree.c (build_cplus_array_type_1): Don't avoid building real
	array types when processing templates unless really necessary.
	(build_exception_variant): Compare the exception lists correctly.

From-SVN: r24314
1998-12-14 15:35:40 +00:00
Mark Mitchell f181d4aea0 cp-tree.def (CPLUS_BINDING): Update documentation.
* cp-tree.def (CPLUS_BINDING): Update documentation.
	* cp-tree.h (LOCAL_BINDING_P): New macro.
	(lang_identifier): Rename local_value to bindings.
	(tree_binding): Make `scope' of type `void*', not `tree'.
	(BINDING_SCOPE): Update documentation.
	(IDENTIFIER_LOCAL_VALUE): Remove.
	(IDENTIFIER_CLASS_VALUE): Document.
	(IDENTIFIER_BINDING): New macro.
	(IDENTIFIER_VALUE): Likewise.
	(TIME_IDENTIFIER_TIME): Likewise.
	(TIME_IDENTIFIER_FILEINFO): Likewise.
	(IMPLICIT_TYPENAME_P): Likewise.
	(set_identifier_local_value): Remove.
	(push_local_binding): New function.
	(push_class_binding): Likewise.
	* class.c (pushclass): Update comments; use push_class_binding.
	* decl.c (set_identifier_local_value_with_scope): Remove.
	(set_identifier_local_value): Likewise.
	(push_binding): New function.
	(pop_binding): Likewise.
	(binding_level): Update documentation.  Remove shadowed.
	(BINDING_LEVEL): New macro.
	(free_binding_nodes): New variable.
	(poplevel): Adjust for new name-lookup scheme.  Don't mess up
	BLOCK_VARs when doing for-scope extension.  Remove effectively
	dead code.
	(pushlevel_class): Tweak formatting.
	(poplevel_class): Adjust for new name-lookup scheme.
	(print_binding_level): Likewise.
	(store_bindings): Likewise.
	(pushdecl): Likewise.
	(pushdecl_class_level): Likewise.
	(push_class_level_binding): Likewise.
	(push_overloaded_decl): Update comments.  Adjust for new
	name-lookup scheme.
	(lookup_name_real): Likewise.
	(lookup_name_current_level): Likewise.
	(cp_finish_decl): Likewise.
	(require_complete_types_for_parms): Likewise.  Remove misleading
	#if 0'd code.
	(grok_parms): Likewise.  Don't call
	require_complete_types_for_parms here.
	(grok_ctor_properties): Don't treat templates as copy
	constructors.
	(grop_op_properties): Or as assignment operators.
	(start_function): Document.  Adjust for new name-lookup scheme.
	(finish_function): Likewise.
	* decl2.c (do_local_using_decl): Use push_local_binding.
	* lex.c (begin_definition_of_inclass_inline): New function, split
	out from ...
	(do_pending_inlines): Here, and ...
	(process_next_inline): Here.
	(get_time_identifier): Use TIME_IDENTIFIER_* macros.
	(init_filename_times): Likewise.
	(extract_interface_info): Likewise.
	(ste_typedecl_interface_info): Likewise.
	(check_newline): Likewise.
	(dump_time_statistics): Likewise.
	(handle_cp_pragma): Likewise.
	(do_identifier): Adjust for new name-lookup scheme.
	* parse.y (function_try_block): Return ctor_initializer_opt value.
	(fndef): Use it.
	(fn.defpen): Pass appropriate values to start_function.
	(pending_inline): Use functor_try_block value, and pass
	appropriate values to finish_function.
	* pt.c (is_member_template): Update documentation; remove handling
	of FUNCTION_DECLs.  As per name, this function should deal only in
	TEMPLATE_DECLs.
	(decl_template_parm_p): Change name of olddecl parameter to decl.
	(check_template_shadow): Adjust for new name-lookup scheme.
	(lookup_template_class): Likewise.
	(tsubst_decl): Tweak so as not to confuse member templates with
	copy constructors and assignment operators.
	(unify): Handle UNION_TYPEs.
	* ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
	(lang_print_xnode): Adjust for new name-lookup scheme.
	* typeck.c (mark_addressable): Likewise.
	(c_expand_return): Likewise.

From-SVN: r24296
1998-12-13 14:46:07 +00:00
Dave Brolley dfb0fb1d90 lex.c (lang_init_options): Initialize cpplib.
Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
	* lex.c (lang_init_options): Initialize cpplib.
	* decl2.c (parse_options,cpp_initialized): Removed.
	(lang_decode_option): Move initialization of cpplib to
	lang_init_options.

From-SVN: r24221
1998-12-09 07:51:24 -05:00
Zack Weinberg 3a5ac29d20 decl2.c: s/data/opts/ when initializing cpp_reader structure.
1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
	* cp/decl2.c: s/data/opts/ when initializing cpp_reader
          structure.

From-SVN: r24155
1998-12-07 09:20:55 -05:00
Jason Merrill 2642b9bfd5 decl.c (build_typename_type): Set DECL_ARTIFICIAL.
* decl.c (build_typename_type): Set DECL_ARTIFICIAL.
	* error.c (dump_simple_decl): Also print namespace context.
	(dump_function_decl): Likewise.
	* decl2.c (ambiguous_decl): Don't print old value if it's
	error_mark_node.
	* decl.c (lookup_name_real): Fix handling of local types shadowed
	by a non-type decl.  Remove obsolete code.
	* cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
Fixes g++.other/lookup6.C
	* lang-options.h: Add -fpermissive.
	* decl2.c: Likewise.
	* cp-tree.h: Add flag_permissive.
	* decl.c (init_decl_processing): If neither -fpermissive or -pedantic
	were specified, set flag_pedantic_errors.
	* call.c (build_over_call): Turn dropped qualifier messages
	back into pedwarns.
	* cvt.c (convert_to_reference): Likewise.
	* typeck.c (convert_for_assignment): Likewise.

From-SVN: r24150
1998-12-07 07:27:47 -05:00
Jason Merrill e5b0708ab9 sort
From-SVN: r24124
1998-12-05 20:44:12 -05:00
Jason Merrill ee996e9e57 decl2.c (coerce_new_type): Use same_type_p.
* decl2.c (coerce_new_type): Use same_type_p.
	(coerce_delete_type): Likewise.
	* call.c (check_dtor_name): Return 1, not error_mark_node.

From-SVN: r24122
1998-12-05 20:33:10 -05:00
Jason Merrill f3400fe27c pt.c (check_template_shadow): New fn.
* pt.c (check_template_shadow): New fn.
	* decl2.c (grokfield): Use it.
	* decl.c (pushdecl): Likewise.
	(pushdecl_class_level): Likewise.
	(start_method): Likewise.
	(xref_tag): Don't try to use 't' if we're defining.
Fixes Sec14/7/C14387.cm.
	* call.c (check_dtor_name): Just return an error_mark_node.
	* pt.c (lookup_template_class): Complain about using non-template here.
	* parse.y (apparent_template_type): Not here.
Fixes Sec14/C14339.cm.
	* pt.c (check_explicit_specialization): Complain about specialization
	with C linkage.
Fixes Sec14/C14340.cm.
	* lang-options.h: Add -f{no-,}implicit-inline-templates.
	* pt.c (convert_nontype_argument): Don't assume that any integer
	argument is intended to be a constant-expression.
Fixes Sec14/7/P14245.C.

From-SVN: r24086
1998-12-04 06:14:21 -05:00
Mark Mitchell 066b4a1cc8 decl2.c (validate_nonmember_using_decl): Complain about using declarations for class members.
* decl2.c (validate_nonmember_using_decl): Complain about using
	declarations for class members.

From-SVN: r24060
1998-12-02 10:12:20 +00:00
Jason Merrill 0b5be8972f update copyrights
From-SVN: r23764
1998-11-22 22:12:41 -05:00
Jason Merrill 72a9314325 class.c (finish_struct_1): Set things up for 0-width bitfields like we do for others.
* class.c (finish_struct_1): Set things up for 0-width bitfields
	like we do for others.
	* decl.c (check_tag_decl): New fn.
	(shadow_tag): Split out from here.
	* decl2.c (grok_x_components): Call it.

From-SVN: r23762
1998-11-22 20:14:55 -05:00
Martin v. Löwis 75fbcb7dd5 decl2.c (validate_nonmember_using_decl): Allow using templates from the global namespace.
* decl2.c (validate_nonmember_using_decl): Allow using templates
	from the global namespace.

From-SVN: r23742
1998-11-21 13:42:29 +00:00
Jason Merrill 161c12b0bf Handle specifying template args to member function templates.
* tree.c (build_overload): Always create an OVERLOAD for a template.
	* search.c (add_conversions): Handle finding an OVERLOAD.
	* decl2.c (check_classfn): Likewise.
	* lex.c (identifier_type): See through a baselink.
	* parse.y (do_id): Don't call do_identifier if we got a baselink.
	* class.c (instantiate_type, case TREE_LIST): Recurse.
	* decl.c (grokdeclarator): Allow a boolean constant for array
	bounds, odd as that sounds.
	* pt.c (unify): Be more strict about non-type parms, except for
	array bounds.
	(UNIFY_ALLOW_INTEGER): New macro.

From-SVN: r23740
1998-11-21 00:42:20 -05:00
Jason Merrill ff350acdf9 semantics.c (begin_class_definition): Call maybe_process_partial_specialization before push_template_decl.
* semantics.c (begin_class_definition): Call
	maybe_process_partial_specialization before push_template_decl.
	Don't call push_template_decl for a specialization.
	* search.c (lookup_field): Do return a member template class.
	* decl2.c (handle_class_head): Handle member template classes.
	* decl.c (grokdeclarator): A parm type need not be complete.
	* pt.c (convert_nontype_argument): Fix thinko.

From-SVN: r23705
1998-11-18 21:35:15 -05:00
Jason Merrill 8ebeee52bc search.c (get_abstract_virtuals): Complain about virtuals with no final overrider.
* search.c (get_abstract_virtuals): Complain about virtuals with
	no final overrider.
	* typeck2.c (abstract_virtuals_error): Remove handling for virtuals
	with no final overrider.
	* class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
	on virtuals with no final overrider.
Fixes Sec10/3/E10120.C
	* lex.c (reinit_parse_for_block): Add a space after the initial ':'.
Fixes Sec9/7/R09434.r0
	* class.c (finish_struct_1): Don't remove zero-width bit-fields until
	after layout_type.
Fixes Sec9/6/P09024.C
	* friend.c (do_friend): Don't set_mangled_name_for_decl.
Fixes Sec9/2/P09075.C
	* class.c (finish_struct_anon): Complain about non-fields.
	* decl2.c (build_anon_union_vars): Likewise.
	* decl.c (grokdeclarator): Normal data members can't have the same
	name as the class, either.
	* class.c (finish_struct_anon): Neither can members of an
	anonymous union.
Fixes Sec9/2/C09268.cm

From-SVN: r23691
1998-11-17 21:21:54 -05:00
Jason Merrill 8452b1d3c1 class.c (instantiate_type): Be more helpful.
* class.c (instantiate_type): Be more helpful.
	* decl2.c (import_export_decl): Call import_export_class.
	* cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
	* decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
	* pt.c (tsubst_copy): Likewise.

From-SVN: r23511
1998-11-03 12:37:51 -05:00
Mark Mitchell 3bfdc7190f cp-tree.h (COMPARE_STRICT): New macro.
* cp-tree.h (COMPARE_STRICT): New macro.
	(COMPARE_BASE): Likewise.
	(COMPARE_RELAXED): Likewise.
	(COMPARE_REDECLARATION): Likewise.
	(same_type_p): Likewise.
	(same_or_base_type_p): Likewise.
	* call.c (standard_conversion): Use them, in place of comptypes
	with numeric arguments.
	(reference_binding): Likewise.
	(convert_like): Likewise.
	(build_over_call): Likewise.
	(is_subseq): Likewise.
	(is_properly_derived_from): Likewise.
	(compare_ics): Likewise.
	(joust): Likewise.
	* class.c (delete_duplicate_fields_1): Likewise.
	(resolves_to_fixed_type_p): Likewise.
	(instantiate_type): Likewise.  Remove #if 0'd code.
	* decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
	(pushdecl): Likewise.
	(lookup_name_real): Likewise.
	(grokdeclarator): Likewise.  Check for illegal array declarations.
	(grokparms): Likewise.
	(grok_op_properties): Likewise.
	* decl2.c (check_classfn): Likewise.
	* friend.c (is_friend): Likewise.
	(make_friend_class): Likewise.
	* init.c (expand_aggr_init): Likewise.
	(expand_vec_init): Likewise.
	* pt.c (is_member_template_class): Remove declaration.
	(is_specialization_of): Use COMPARE_* and new macros.
	(comp_template_parms): Likewise.
	(convert_nontype_argument): Likewise.
	(coerce_template_template_parms): Likewise.
	(template_args_equal): Likewise.
	(lookup_template_class): Likewise.
	(type_unification_real): Likewise.
	(unify): Likewise.
	(get_bindings_real): Likewise.
	* search.c (covariant_return_p): Likewise.
	(get_matching_virtual): Likewise.
	* sig.c (match_method_types): Likewise.
	* tree.c (vec_binfo_member): Likewise.
	(cp_tree_equal): Likewise.
	* typeck.c (common_type): Likewise.
	(comp_array_types): Likewise.  Get issues involving unknown array
	bounds right.
	(comptypes): Update comments.  Use new flags.
	(comp_target_types): Use new macros.
	(compparms): Likewise.
	(comp_target_parms): Likewise.
	(string_conv_p): Likewise.
	(build_component_ref): Likewise.
	(build_indirect_ref): Likewise.
	(build_conditional_expr): Likewise.
	(build_static_cast): Likewise.
	(build_reinterpret_cast): Likewise.
	(build_const_cast): Likewise.
	(build_modify_expr): Likewise.
	(convert_for_assignment): Likewise.
	(comp_ptr_ttypes_real): Likewise.
	(ptr_reasonably_similar): Likewise.
	(comp_ptr_ttypes_const): Likewise.

From-SVN: r23490
1998-11-01 15:45:11 +00:00
Mark Mitchell 8a72a04676 decl2.c (delete_sanity): Pass integer_zero_node, not integer_two_node, to build_vec_delete.
* decl2.c (delete_sanity): Pass integer_zero_node, not
	integer_two_node, to build_vec_delete.
	* init.c (build_array_eh_cleanup): Remove.
	(expand_vec_init_try_block): New function.
	(expand_vec_init_catch_clause): Likewise.
	(build_vec_delete_1): Don't deal with case that auto_delete_vec
	might be integer_two_node anymore.
	(expand_vec_init): Rework for initialization-correctness and
	exception-correctness.
	* typeck2.c (process_init_constructor): Make mutual exclusivity
	of cases more obvious.

From-SVN: r23455
1998-10-30 11:17:50 +00:00
Jason Merrill 2455f26fc1 class.c (finish_struct_1): Don't complain about non-copy assignment ops in union members.
* class.c (finish_struct_1): Don't complain about non-copy
	assignment ops in union members.
	* class.c (build_vtable): Don't pass at_eof to import_export_vtable.
	(prepare_fresh_vtable): Likewise.
	(finish_struct_1): Don't call import_export_class.
	* decl2.c (finish_vtable_vardecl): Do import/export stuff.
	(finish_prevtable_vardecl): Lose.
	(finish_file): Don't call it.
	* pt.c (instantiate_class_template): Likewise.

From-SVN: r23410
1998-10-28 15:29:09 -05:00
Jason Merrill aa45967f76 call.c (add_function_candidate): Treat conversion functions as coming from the argument's class.
* call.c (add_function_candidate): Treat conversion functions
	as coming from the argument's class.
	* cp-tree.h (DECL_CONV_FN_P): New fn.
	(DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
	* class.c (add_method): Use DECL_CONV_FN_P.
	* decl2.c (check_classfn): Likewise.
	* error.c (dump_function_name): Likewise.
	(dump_function_decl): Likewise.
	* pt.c (fn_type_unification): Likewise.
	* search.c (add_conversions): Likewise.

From-SVN: r23387
1998-10-27 20:53:50 -05:00
Mark Mitchell 91063b5138 cplus-dem.c (work_stuff): Replace const_type and volatile_type with type_quals.
* cplus-dem.c (work_stuff): Replace const_type and volatile_type
	with type_quals.
	(TYPE_UNQUALIFIED): New macro.
	(TYPE_QUAL_CONST): Likewise.
	(TYPE_QUAL_VOLATILE): Likewise.
	(TYPE_QUAL_RESTRICT): Likewise.
	(code_for_qualifier): New function.
	(qualifier_string): Likewise.
	(demangle_qualifier): Likewise.
	(internal_cplus_demangle): Use them.
	(demangle_signature): Likewise.
	(demangle_template_value_parm): Likewise.
	(do_type): Likewise.
	(demangle_fund_type)): Likewise.
	* Makefile.in (hash.h): Run gperf when necessary.
	* cp-tree.h (CP_TYPE_READONLY): Remove.
	(CP_TYPE_VOLATILE): Likewise.
	(CP_TYPE_QUALS): New macro.
	(CP_TYPE_CONST_P): Likewise.
	(CP_TYPE_VOLATILE_P): Likewise.
	(CP_TYPE_RESTRICT_P): Likewise.
	(CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
	(cp_build_type_variant): Rename to ...
	(cp_build_qualified_type): New function.
	(c_apply_type_quals_to_decl): Declare.
	(SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
	(SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
	(cp_type_qual_from_rid): New function.
	(compparms): Remove unused parameter.  All callers changed.
	(cp_type_quals): New function.
	(at_least_as_qualified_p): Likewise.
	(more_qualified_p): Likewise.
	* call.c (standard_conversion): Replace calls to
	cp_build_type_variant with cp_build_qualified_type.  Use
	CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
	compare them.  Use CP_TYPE_* macros to check qualifiers.
	(reference_binding): Likewise.
	(implicit_conversion): Likewise.
	(add_builtin_candidates): Likewise.
	(build_over_call): Likewise.
	* class.c (overrides): Compare all qualifiers, not just `const',
	on method declarations.
	* cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
	(convert_pointer_to_real): Likewise.
	(type_promotes_to): Likewise.
	* decl.c (check_for_uninitialized_const_var): New function.
	(init_decl_processing): More CP_TYPE_QUALS conversion, etc.
	(cp_finish_decl): Use check_for_uninitialized_const_var.
	(grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
	handle `restrict'.
	(grok_ctor_properties): Likewise.
	(grok_op_properties): Likewise.
	(start_function): Likewise.
	(rever_static_member_fn): Likewise.
	* decl2.c (grok_method_quals): Likewise.
	(grokfield): Likewise.
	* error.c (dump_readonly_or_volatile): Rename to ...
	(dump_qualifiers): New function.  Handle `restrict'.
	(dump_type_real): Use it.
	(dump_aggr_type): Likewise.
	(dump_type_prefix): Likewise.
	(dump_type_suffix): Likewise.
	(dump_function_decl): Likewise.
	(cv_as_string): Likewise.
	* gxx.gperf: Add __restrict and __restrict__.
	* gxxint.texi: Document `u' as used for `__restrict', and a few
	other previously undocumented codes.
	* hash.h: Regenerated.
	* init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
	(build_member_call): Likewise.
	(build_new_1): Likewise.
	* lex.c (init_parse): Add entry for RID_RESTRICT.
	(cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
	(cp_type_qual_from_rid): Define.
	* lex.h (enum rid): Add RID_RESTRICT.
	* method.c (process_modifiers): Deal with `restrict'.
	* parse.y (primary): More CP_TYPE_QUALS conversion, etc.
	* parse.c: Regenerated.
	* pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
	(tsubst_aggr_type): Likewise.
	(tsubst): Likewise.
	(check_cv_quals_for_unify): Likewise.
	(unify): Likewise.
	* rtti.c (init_rtti_processing): Likewise.
	(build_headof): Likewise.
	(get_tinfo_var): Likewise.
	(buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
	(expand_class_desc): Likewise.
	(expand_attr_desc): Likewise.
	(synthesize_tinfo_fn): Likewise.
	* search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
	(get_matching_virtual): Likewise.
	(expand_upcast_fixups): Likewise.
	* sig.c (build_signature_pointer_or_reference_name): Take
	type_quals, not constp and volatilep.
	(build_signature_pointer_or_reference_type): Likewise.
	(match_method_types): More CP_TYPE_QUALS conversion, etc.
	(build_signature_pointer_constructor): Likewise.
	(build_signature_method_call): Likewise.
	* tree.c (build_cplus_array_type): Likewise.
	(cp_build_type_variant): Rename to ...
	(cp_build_qualified_type): New function.  Deal with `__restrict'.
	(canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
	(build_exception_variant): Likewise.
	(mapcar): Likewise.
	* typeck.c (qualif_type): Likewise.
	(common_type): Likewise.
	(comptypes): Likewise.
	(comp_cv_target_types): Likewise.
	(at_least_as_qualified_p): Define.
	(more_qualified_p): Likewise.
	(comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
	(compparms): Likewise.
	(inline_conversion): Likewise.
	(string_conv_p): Likewise.
	(build_component_ref): Likewise.
	(build_indirect_ref): Likewise.
	(build_array_ref): Likewise.
	(build_unary_op): Likewise.
	(build_conditional_expr): Likewise.
	(build_static_cast): Likewise.
	(build_c_cast): Likewise.
	(build_modify_expr): Likewise.
	(convert_For_assignment): Likewise.
	(comp_ptr_ttypes_real): Likewise.
	(cp_type_quals): New function.

From-SVN: r23258
1998-10-23 14:53:28 +00:00
Martin v. Löwis f09bbbedfb parse.y (named_class_head): Push into class while parsing the base class list.
* parse.y (named_class_head): Push into class while parsing the
	base class list.
	* decl2.c (push_scope, pop_scope): New functions.
	* tree.h: Declare them.

From-SVN: r23224
1998-10-22 14:52:02 +00:00
Jason Merrill 51924768e7 Revamp references to member functions.
* method.c (hack_identifier): Call build_component_ref for a
	reference to a member function.
	* typeck.c (build_component_ref): Only return a single function
	if it's static.  Otherwise, return a COMPONENT_REF.
	(build_x_function_call): Handle a COMPONENT_REF.
	(build_unary_op): Handle all unknown-type things.
	* decl2.c (arg_assoc): Handle COMPONENT_REF.
	* class.c (instantiate_type): Complain if the function we get is a
	nonstatic member function.  Remove code for finding "compatible"
	functions.
	* pt.c (tsubst_copy): Handle NOP_EXPR.
	* tree.c (build_dummy_object): New fn.
	(maybe_dummy_object): New fn.
	(is_dummy_object): New fn.
	* cp-tree.h: Declare them.
	* cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
	* error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
	* init.c (build_member_call): Use maybe_dummy_object and
	is_dummy_object.
	(build_offset_ref): Use maybe_dummy_object.
	(resolve_offset_ref): Use is_dummy_object.
	* typeck.c (build_x_function_call): Call build_dummy_object.
	(unary_complex_lvalue): Call is_dummy_object.
	* typeck.c (build_component_addr): Make sure field is a field.
	* call.c (build_new_op): Delete obsolete code.
	* pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.

From-SVN: r23186
1998-10-19 16:08:23 -04:00
Martin v. Löwis 39ee4d93e6 decl2.c (validate_nonmember_using_decl): Fix using-directives of std if std is ignored.
* decl2.c (validate_nonmember_using_decl): Fix using-directives of
        std if std is ignored.

From-SVN: r23162
1998-10-18 09:21:17 +00:00
Jason Merrill 52fbc84763 parse.y (fn.def2): Fix 'attrs' format.
* parse.y (fn.def2): Fix 'attrs' format.
	* Makefile.in (CONFLICTS): Update.
	* parse.y (expr_or_declarator_intern): New rule.
	(expr_or_declarator, direct_notype_declarator, primary,
	functional_cast): Use it.
	(notype_declarator_intern): New rule.
	(notype_declarator, complex_notype_declarator): Use it.

From-SVN: r23159
1998-10-17 23:10:53 -04:00
Mark Mitchell 6b4b3deb4e class.c (add_method): Fix documentation to reflect previous changes.
* class.c (add_method): Fix documentation to reflect previous
	changes.  Check for duplicate method declarations here.
	* decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
	correctly; such things never match.
	(grokfndecl): Don't look for duplicate methods here.
	* decl2.c (check_classfn): Don't assume names are mangled.
	Don't add bogus member function declarations to a class before the
	class type is complete.
	(grokfield): Reformat error message.
	* method.c (set_mangled_name_for_decl): Don't mangle names while
	procesing_template_decl.

From-SVN: r23132
1998-10-16 12:08:01 +00:00
Jason Merrill 162bc98d09 typeck.c (build_indirect_ref): Complain about a pointer to data member, too.
* typeck.c (build_indirect_ref): Complain about a pointer to data
	member, too.
	* typeck2.c (build_m_component_ref): Don't indirect a pointer to
	data member.
	* init.c (resolve_offset_ref): Don't undo the above.
	* cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
	(struct lang_decl_flags): Add `bitfield'.
	* class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
	DECL_BIT_FIELD.
	* decl2.c (grokbitfield, grok_alignof): Likewise.
	* init.c (build_offset_ref): Likewise.
	* typeck.c (build_component_addr, expr_sizeof): Likewise.
	* cvt.c (build_up_reference): Don't crash if taking the address
	returns error_mark_node.

From-SVN: r23124
1998-10-15 23:37:43 -04:00
Manfred Hollstein 066d147cbf decl2.c (start_objects): Add new variable `joiner' and initialize it properly.
8
	* decl2.c (start_objects): Add new variable `joiner' and
	initialize it properly.

From-SVN: r22975
1998-10-10 09:24:06 +00:00
Mark Mitchell 61a127b3d1 cp-tree.def (PTRMEM_CST): New tree node.
* cp-tree.def (PTRMEM_CST): New tree node.
	* cp-tree.h (ptrmem_cst): New type.
	(lang_type): Remove local_typedecls.
	(dummy): Increase to 12 bits from 11.
	(CLASSTYPE_LOCAL_TYPEDECLS): Remove.
	(PTRMEM_CST_CLASS): New macro.
	(PTRMEM_CST_MEMBER): Likewise.
	(current_access_specifier): New variable.
	(current_class_type): Remove duplicate declaration.
	(finish_struct): Change prototype.
	(unreverse_member_declarations): New function.
	(pushdecl_class_level): Change prototype.
	(grok_enum_decls): Remove.
	(fixup_anonymous_union): New function.
	(grok_x_components): Change prototype.
	(tsubst_chain): Remove.
	(finish_member_template_decl): Likewise.
	(check_explicit_specialization): Fix indentation.
	(finish_class_definition): Change prototype.
	(finish_member_class_template): Likewise.
	(finish_member_declaration): New function.
	(check_multiple_declarators): Likewise.
	* class.c (class_stack_node_t): New type.
	(current_class_base): Remove.
	(current_class_stack): Change type.
	(current_access_specifier): New variable.
	(grow_method): Remove.
	(check_member_decl_is_same_in_complete_scope): Break out from
	finish_struct.
	(make_method_vec): New function.
	(free_method_vec): Likewise.
	(add_implicitly_declared_members): Break out from finish_struct_1.
	(free_method_vecs): New variable.
	(add_method): Rework for direct use from parser.
	(handle_using_decl): Watch for NULL_TREE while iterating through
	CLASSTYPE_METHOD_VEC.
	(finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
	just do some error-checking.
	(warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
	(finish_struct_1): Simplify.  Use add_implicitly_declared_members.
	(finish_struct): Change prototype.  Simplify; fields and methods
	are already set up at this point.
	(init_class_processing): Set up current_class_stack.
	(pushclass): Save current_access_specifier.
	(popclass): Restore it.
	(currently_open_class): Simplify.
	(build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
	* decl.c (saved_scope): Add access_specifier.
	(maybe_push_to_top_level): Save it.
	(pop_from_top_level): Restore it.
	(maybe_process_template_type_declaration): Use
	finish_member_declaration.
	(pushtag): Likewise.
	(pushdecl_class_level): Don't return a value.
	(fixup_anonymous_union): Break out from grok_x_components.
	(shadow_tag): Use it.
	(xref_tag): Complain about using an elaborated type specifier to
	reference a template type parameter or typedef name.
	(xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
	(current_local_enum): Remove.
	(build_enumerator): Call finish_member_declaration.
	(grok_enum_decls): Remove.
	* decl2.c (grok_x_components): Simplify.
	(check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
	(grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
	(merge_functions): Add to comment.
	(arg_assoc_type): Prototype.
	(arg_assoc): Pass as many arguments as there are parameters.
	* error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
	OFFSET_REF.
	* expr.c (cpls_expand_expr): Remove dead code.  Handle
	PTRMEM_CST.
	* friend.c (do_friend): Lookup friends when in nested classes.
	Change comments.
	* init.c (build_offset_ref): Do lookup even for classes that are
	only partially defined.
	(decl_constant_value): Remove dead code.
	* method.c (build_overload_value): Remove hack where by TYPE was
	not a TYPE.  Handle PTRMEM_CST.
	(build_template_parm_names): Don't pass a PARM_DECL where a TYPE
	should go.
	* parse.y (components, notype_components, component_decl,
	component_decl_1, component_declarator, component_declarator0):
	Now all are itype rather than ttype.  Rework to add members to
	classes on the fly.
	(typesqpecqual_reserved): Use check_multiple_declarators.
	(structsp): Update class to finish_class_definition.
	(do_xref_defn): Unsplit into named_class_head.
	(access_specifier): Set current_access_specifier.
	* pt.c (set_current_access_from_decl): New function.
	(finish_member_template_decl): Don't take the parameters.
	(comp_template_args): Make more robust.
	(lookup_template_class): Don't use current_local_enum.
	(for_each_template_parm): Handle PTRMEM_CST.
	(instantiate_class_template): Use set_current_access_from_decl,
	finish_member_declaration and unreverse_member_declarations.  Set
	lineno/input_filename before generating implicit member functions.
	(type_unification_real): Don't assume back-unification happens
	only for the last argument.
	(regenerate_decl_from_template): Call pushclass a bit earlier.
	(tsubst_chain): Remove.
	(tsubst_enum): Use set_current_access_from_decl.
	(set_mangled_name_for_template_decl): Fix indentation.
	* search.c (lookup_fnfields_1): Change iteration through
	CLASSTYPE_METHOD_VEC.
	(dfs_pushdecls): Likewise.
	(dfs_compress_decls): Likewise.
	(add_conversions): Likewise.
	* semantics.c (finish_class_definition): Don't take components.
	Change call to finish_struct.
	(finish_member_declaration): New function.
	(finish_member_class_template): Don't take template parameters.
	Change call to grok_x_components.  Call finish_member_template_decl.
	(check_multiple_declarators): New function.
	* sig.c (append_signature_fields): Work from the TYPE_METHODS, not
	a passed in fieldlist.
	* tree.c (search_tree): Handle PTRMEM_CST.
	(mapcar): Likewise.
	* typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
	INTEGER_CSTs, for pointer-to-data members.

From-SVN: r22869
1998-10-06 14:20:30 +00:00
Mark Mitchell 01240200ee class.c (current_class_ptr, [...]): Clarify documentation.
* class.c (current_class_ptr, current_class_ref): Clarify
	documentation.
	* cvt.c (ocp_convert): Don't expect fold to remove all trivial
	NOP type conversions.
	* decl.c (decls_match): Use comptypes directly; ignore
	qualifiers on the DECL.
	(duplicate_decls): Remove qualifier checks on DECL.
	(grokdeclarator): Make the type built up include top-level
	qualifiers.
	* decl2.c (do_dtors): Fix spelling error.
	* error.c (dump_simple_decl): Don't look at qualifiers on the decl
	when printing type information.
	* init.c (build_new_1): Add documentation.  Deal with the fact
	that type of allocated memory now contains qualifiers.
	* lex.c (is_global): Improve error-recovery.
	* sig.c (build_member_function_pointer): Don't cast away const
	on fields of sigtable_entry_type.
	* tree.c (lvalue_type): Don't look at top-level qualifiers on
	expressions.
	* typeck.c (decay_conversion): Likewise.
	(build_component_ref): Make sure the type of the COMPONENT_REF
	contains top-level qualifiers, as appropriate.  Improve
	error-handling.
	(build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
	(build_array_ref): Likewise.
	(build_unary_op): Improve error-recovery.
	(unary_complex_lvalue): Make taking the address a bound member
	function an error, not a sorry.
	(build_conditional_expr): Look at the type qualifiers, not the
	qualifiers on the expression itself.

From-SVN: r22802
1998-10-03 23:11:19 +00:00
Jason Merrill 5eea678fdb decl2.c (merge_functions): Remove duplicates.
* decl2.c (merge_functions): Remove duplicates.
	* decl2.c: Add -f{no-,}implicit-inline-templates.
	(lang_decode_option): Unset it if -frepo.
	(import_export_decl): Check it.
	* decl.c (lookup_name_real): Template parms also take precedence
	over implicit typename.  Only warn if yylex.

From-SVN: r22800
1998-10-03 18:53:37 -04:00
Jason Merrill c3437800be decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN instead of linkage.
* decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
	instead of linkage.

From-SVN: r22793
1998-10-03 11:46:48 -04:00
Mark Mitchell 4f70a84653 decl.c (grokdeclarator): Tighten checks for invalid destructors.
* decl.c (grokdeclarator): Tighten checks for invalid
	destructors.  Improve error-messages and error-recovery.
	* decl2.c (check_classfn): Don't assume that mangled destructor
	names contain type information.

From-SVN: r22630
1998-09-28 17:34:33 +00:00
Jason Merrill 18141e4c18 search.c (get_base_distance): Remove assert.
* search.c (get_base_distance): Remove assert.
	* decl2.c (build_anon_union_vars): Don't process a field with no
	name.
	(finish_anon_union): Also complain about local anon unions with no
	members.

From-SVN: r22597
1998-09-25 17:34:50 -04:00
Kaveh R. Ghazi b370501f72 Warning fixes:
* cp-tree.h (define_case_label): Remove unused parameter.
	(check_java_method): Likewise.
	(grokclassfn): Likewise.
	(expand_aggr_init): Likewise.
	(build_x_delete): Likewise.
	(maybe_end_member_template_processing): Likewise.
	(unshare_base_binfos): Add prototype.
	(string_conv_p): Likewise.
	(my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
	* cvt.c (build_up_reference): Remove unused parameter
 	`checkconst', all callers changed.
	(build_type_conversion): Mark parameter `code' with
	ATTRIBUTE_UNUSED.
	(build_expr_type_conversion): Initialize variable `conv'.
	* decl.c (push_namespace): Initialize variable `d'.
  	(define_case_label): Remove unused parameter `decl', all callers
 	changed.
	* decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
 	`argc' with ATTRIBUTE_UNUSED.
	(grokclassfn): Remove unused parameter `cname', all callers
 	changed.
	(check_java_method): Likewise for parameter `ctype'.
	(copy_assignment_arg_p): Mark parameter `virtualp' with
	ATTRIBUTE_UNUSED.
	(finish_prevtable_vardecl): Likewise for parameter `prev'.
	* expr.c (extract_init): Likewise for parameters `decl' and `init'.
	* init.c (expand_aggr_init_1): Remove unused parameter
 	`alias_this', all callers changed.
	(expand_aggr_init): Likewise.
	(expand_default_init): Likewise.
	(build_new_1): Initialize variable `susp'.
	(build_x_delete): Remove unused parameter `type', all callers
	changed.
	* lex.c (set_typedecl_interface_info): Mark parameter `prev' with
	ATTRIBUTE_UNUSED.
	(readescape): Use (unsigned) value in shift.
	(real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
	comparing to a signed quantity.
	* pt.c (maybe_end_member_template_processing): Remove unused
 	parameter `decl', all callers changed.
	(check_explicit_specialization): Add braces around empty body in
	an else-statement.
	(current_template_args): Initialize variable `args'.
	(lookup_template_class): Likewise for variable `prev_local_enum'.
	(tsubst_decl): Likewise for variable `r'.
	(set_mangled_name_for_template_decl): Initialize variable
	`context'.
	* spew.c (scan_tokens): Change type of parameter `n' to unsigned.
	Likewise for variable `i'.
	(yylex): Initialize variable `trrr'.
	* typeck.c (compparms): Mark variable `strict' with
	ATTRIBUTE_UNUSED.
	* xref.c (simplify_type): Cast argument of ctype function to
	`unsigned char'.

From-SVN: r22587
1998-09-25 09:00:04 +00:00
Mark Mitchell 3ddfb0e624 decl.c (grokfndecl): Improve error-recovery.
* decl.c (grokfndecl): Improve error-recovery.
	* decl2.c (grokfield): Likewise.
	* pt.c (finish_member_template_decl): Likewise.

From-SVN: r22549
1998-09-22 11:58:41 +00:00
Jason Merrill 8251199e44 revert error reporting patch
From-SVN: r22310
1998-09-07 10:25:35 -04:00
Mark Mitchell d41fbd2cb8 cp-error.def: New file.
* cp-error.def: New file.
	* Make-lang.in (cc1plus): Add dependency on it.
	* Makefile.in (CXX_TREE_H): Likewise.
	* cp-tree.h (error_code): New type.
	Include cp-error.def to get error codes.  Make it possible to
	include cp-tree.h in errfn.c.
	(enable_warning): New function.
	(flag_diag_codes): New variable.
	* errfn.c: Include cp-tree.h.
	(cp_err_msg): New type.  Include cp-error.def to define it.
	(err_msgs): New variable.
	(is_warning_enabled): New function.
	(cp_thing): Take an error_code, not a format string.  Output the
	diagnostic code if flag_diag_codes.
	(cp_error, cp_compiler_error, cp_sprintf, cp_error_at): Take
	error_codes, not format strings.
	(cp_warning, cp_pedwarn, cp_warning_at, cp_pedwarn_at): Likewise.
	Call is_warning_enabled.
	* decl2.c (flag_diag_codes): New variable.
	(lang_decode_option): Handle -fdiag-codes and -Wnumber.
	* lang-options.h: Add -fdiag-codes, -fno-diag-codes, and
	-W-number-, and -Wno-number.
	* class.c: Update all calls to error-functions.
	* cvt.c: Likewise.
	* decl.c: Likewise.
	* decl2.c: Likewise.
	* except.c: Likewise.
	* expr.c: Likewise.
	* friend.c: Likewise.
	* lex.c: Likewise.
	* parse.y: Likewise.
	* pt.c: Likewise.
	* repo.c: Likewise.
	* rtti.c: Likewise.
	* search.c: Likewise.
	* semantics.c: Likewise.
	* sig.c: Likewise.
	* tree.c: Likewise.
	* typeck.c: Likewise.
	* typeck2.c: Likewise.
	* xref.c: Likewise.

From-SVN: r22304
1998-09-06 19:45:16 +00:00
Mark Mitchell 6c30752f09 cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
* cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
	* class.c (finish_struct): Remove hackery to deal with explicit
	specializations in class scope.
	* decl.c (grokfndecl): Improve error-recovery.
	* decl2.c (grokfield): Likewise.
	* pt.c (check_specialization_scope): New function.
	(begin_specialization): Call it.
	(process_partial_specialization): New function, split out from
	push_template_decl.  Check partial specializations more
	stringently.
	(push_template_decl): Call it.
	(check_explicit_specialization): Don't attempt to handle explicit
	specializations in class scope.
	(template_parm_data): Document.  Add current_arg and
	arg_uses_template_parms.
	(mark_template_parm): Set it.
	(tsubst_arg_types): Remove unused variable.
	* semantics.c (begin_class_definition): Tweak.

From-SVN: r22271
1998-09-05 20:14:21 +00:00
Jason Merrill 1a408d0724 decl2.c (import_export_vtable): Always make artificials comdat.
* decl2.c (import_export_vtable): Always make artificials comdat.
	(import_export_decl): Likewise.
	* pt.c (mark_decl_instantiated): Likewise.

From-SVN: r22230
1998-09-03 21:43:58 -04:00
Benjamin Kosnik 7f84cec92c cp-tree.h: Declare warn_nontemplate_friend.
d
1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
	* cp-tree.h: Declare warn_nontemplate_friend.
	* decl2.c (lang_decode_option): Set.
	* lang-options.h: Add -Wnon-template-friend.
	* friend.c (do_friend): Use to toggle non-template function warning.
g++/17054

From-SVN: r22220
1998-09-03 16:10:00 +00:00
Jason Merrill 59fa060f42 decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
* decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
	* class.c (build_vtable_entry_ref): Likewise.

From-SVN: r22161
1998-09-01 09:17:36 -04:00