Age | Commit message (Collapse) | Author | Files | Lines |
|
* cp-tree.def (START_CATCH_STMT): Lose.
* dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
* tree.c (cp_statement_code_p): Don't case it.
* semantics.c (cp_expand_stmt): Likewise.
* except.c (expand_start_catch_block): Don't start any blocks.
Return the type.
(expand_end_catch_block): Don't end any blocks.
* parse.y (handler): Don't pass anything from finish_handler_parms
to finish_handler.
* pt.c (tsubst_expr): Likewise.
* semantics.c (begin_handler): Call note_level_for_catch here.
(finish_handler_parms): Don't return anything.
(genrtl_catch_block, begin_catch_block): Lose.
(genrtl_handler): Call expand_start_catch here.
* cp-tree.h (START_CATCH_TYPE): Lose.
(HANDLER_TYPE): New.
From-SVN: r42388
|
|
2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (determine_specialization): Ignore artificial functions.
2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* g++.old-deja/g++.pt/spec41.C: New test.
From-SVN: r42342
|
|
cp:
* cp-tree.def (USING_STMT): New statement node.
* cp-tree.h (USING_STMT_NAMESPACE): New macro.
* decl2.c (do_using_directive): Add USING_STMT to statement
tree. Don't emit errors when processing template decl.
* pt.c (tsubst_expr, USING_STMT case): New case.
* semantics.c (cp_expand_stmt, USING_STMT case): New case.
testsuite:
* g++.old-deja/g++.ns/template17.C: New test.
From-SVN: r41724
|
|
gcc:
Lazy __FUNCTION__ generation.
* c-common.h (RID_FUNCTION_NAME, RID_PRETTY_FUNCTION_NAME,
RID_C99_FUNCTION_NAME): New _RIDs.
(CTI_FUNCTION_ID, CTI_PRETTY_FUNCTION_ID, CTI_FUNC_ID): Remove.
(CTI_FUNCTION_NAME_DECL, CTI_PRETTY_FUNCTION_NAME_DECL,
CTI_C99_FUNCTION_NAME_DECL, CTI_SAVED_FUNCTION_NAME_DECLS): New
global tree slots.
(function_id_node, pretty_function_id_node, func_id_node): Remove.
(c99_function_name_decl_node, function_name_decl_node,
pretty_function_name_decl_node, saved_function_name_decls):
Declare.
(struct language_function): Remove x_function_name_declared_p.
(make_fname_decl): Remove a parameter.
(declare_function_names): Remove prototype.
(start_fname_decls, finish_fname_decls): Prototype.
(fname_as_string): Likewise.
(fname_string, fname_decl): Likewise.
* c-common.c (make_fname_decl): Adjust.
(struct fname_var_t): New struct.
(fname_vars): New static array.
(declare_function_name): Remove.
(start_fname_decls, finish_fname_decls): New functions.
(fname_as_string): New function from remnants of
declare_function_name.
(fname_string, fname_decl): New functions.
* c-decl.c (c_function_name_declared_p): Remove.
(init_decl_processing): Don't generate __FUNCTION__ et al ids,
don't call declare_function_name. Call start_fname_decls.
(c_make_fname_decl): Adjust parameters. Generate the name. Don't
clobber the line number. Call finish_decl.
(start_function): Call start_fname_decls.
(finish_function): Call finish_fname_decls.
Remove c_function_name_declared_p.
(push_c_function_context): Don't push c_function_name_declared_p.
(pop_c_function_context): Don't pop c_function_name_declared_p.
(c_begin_compound_stmt): Don't check c_function_name_declared_p.
* c-parse.in (STRING_FUNC_NAME, VAR_FUNC_NAME): New tokens.
(program): Call finish_fname_decls for C.
(primary): Add VAR_FUNC_NAME.
(reswords): Add slots for __FUNCTION__ et al.
(rid_to_yy): Add mappings for __FUNCTION__ et al.
(yylexname): If it's a STRING_FUNC_NAME generate the function name
now. Don't look for VAR_DECLs containing __FUNCTION__ et al.
* c-semantics.c (prune_unused_decls): Remove.
(finish_stmt_tree): Don't call prune_unused_decls.
(genrtl_decl_stmt): Don't prune unused decls here.
cp:
Lazy __FUNCTION__ generation.
* cp-tree.def (FUNCTION_NAME): Remove.
* cp-tree.h (function_name_declared_p): Remove.
(cp_fname_init): Prototype.
* decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
don't call declare_function_name. Call start_fname_decls.
(cp_make_fname_decl): Adjust parameters. Generate the name. Don't
clobber the line number.
(cp_fname_init): New function.
(start_function): Call start_fname_decls.
(finish_function): Call finish_fname_decls.
* lex.c (reswords): Add slots for __FUNCTION__ et al.
(rid_to_yy): Add mappings for __FUNCTION__ et al.
* optimize.c (maybe_clone_body): Remove function_name_declared_p.
* parse.y (VAR_FUNC_NAME): New token.
(primary): Add VAR_FUNC_NAME.
* pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
generation.
(tsubst, FUNCTION_NAME case): Remove.
(tsubst_copy, FUNCTION_NAME case): Remove.
(tsubst_expr, DECL_STMT case): Be careful with a
DECL_PRETTY_FUNCTION_P.
(instantiate_decl): Remove function_name_declared_p.
* semantics.c (begin_compound_statement): Don't call
declare_function_name here.
(setup_vtbl_ptr). Don't save & restore function_name_declared_p.
(finish_translation_unit): Call finish_fname_decls.
(expand_body): Remove function_name_declared_p.
* typeck2.c (digest_init): Allow any ERROR_MARK.
testsuite:
* gcc.dg/c99-func-2.c: Remove xfail.
* gcc.dg/c99-func-3.c: Remove xfail.
* gcc.dg/c99-func-4.c: Remove xfail.
From-SVN: r41520
|
|
cp:
* pt.c (tsubst_decl): Use VOID_TYPE_P.
* semantics.c: Fix some typos.
From-SVN: r41519
|
|
* cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
(TYPE_ANONYMOUS_P): New macro.
(TAGGED_TYPE_P): New macro.
* decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
(grokfndecl, grokvardecl, grokdeclarator): Likewise.
* tree.c (no_linkage_helper): Likewise.
* semantics.c (begin_class_definition): Likewise.
* pt.c (convert_template_argument): Likewise.
* lex.c (check_for_missing_semicolon): Likewise.
From-SVN: r41303
|
|
2001-03-27 Phil Edwards <pme@sources.redhat.com>
* pt.c (check_default_tmpl_args): Make error messages clearer.
From-SVN: r40889
|
|
that doesn't already have its...
* pt.c (instantiate_decl): Abort if we see a member constant
instantiation that doesn't already have its initializer.
Downgrade explicit instantiation without definition to pedwarn.
* cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
* class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
(import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
* cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
(pending_vtables): Remove.
* decl2.c (pending_vtables): Remove.
(import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
CLASSTYPE_VTABLE_NEEDS_WRITING.
(import_export_class): Likewise.
(init_decl2): Don't mark pending_vtables.
* lex.c (handle_pragma_vtable): Just sorry.
* pt.c (instantiate_class_template): Don't mess with
CLASSTYPE_VTABLE_NEEDS_WRITING.
(mark_class_instantiated): Likewise.
* ptree.c (print_lang_type): Don't print it.
* semantics.c (begin_class_definition): Don't set it.
* pt.c (template_tail): Replace with last_pending_template.
(maybe_templates, maybe_template_tail): Remove.
(add_pending_template): Adjust.
(instantiate_pending_templates): Adjust.
* cp-tree.h (struct saved_scope): Remove lang_stack field.
(current_lang_stack): Remove.
* decl.c (maybe_push_to_top_level): Don't initialize it.
(duplicate_decls): Use current_lang_depth.
(xref_basetypes): Likewise.
* class.c (current_lang_depth): New fn.
(push_lang_context): Use more varray functionality.
(pop_lang_context): Likewise.
From-SVN: r40724
|
|
* tree.h (DECL_ASSEMBLER_NAME): Compute it lazily.
(DECL_ASSEMBLER_NAME_SET_P): New macro.
(SET_DECL_ASSEMBLER_NAME): Likewise.
(COPY_DECL_ASSEMBLER_NAME): Likewise.
(set_decl_assembler_name): Declare.
(lang_set_decl_assembler_name): Likewise.
* tree.c (lang_set_decl_assembler_name): New variab.e
(set_decl_assembler_name): New function.
(init_obstacks): Set lang_set_decl_assembler_name.
(build_decl): Don't set DECL_ASSEMBLER_NAME.
* c-decl.c (duplicate_decls): Use SET_DECL_ASSEMBLER_NAME,
COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
where it's not necessary.
(builtin_function): Likewise.
(finish_decl): Likewise.
* dbxout.c (dbxout_type_methods): Likewise.
* ggc-common.c (ggc_mark_trees): Likewise.
* profile.c (output_func_start_profiler): Likewise.
* varasm.c (make_decl_rtl): Likewise.
* class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
where it's not necessary.
(add_method): Remove optimization involving comparison of
DECL_ASSEMBLER_NAME.
(build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
where it's not necessary.
(check_methods): Likewise.
(build_clone): Likewise.
(built_vtt): Likewise.
* cp-tree.h (DECL_NEEDED_P): Likewise.
* decl.c (pushtag): Likewise.
(duplicate_decls): Likewise.
(pushdecl): Likewise.
(builtin_function): Likewise.
(build_library_fn_1): Set DECL_LANGUAGE for library functions.
(build_cp_library_fn): Likewise.
(maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
where it's not necessary.
(make_rtl_for_nonlocal_decl): Likewise.
(cp_finish_decl): Likewise.
(grokfndecl): Likewise.
(grokvardecl): Likewise.
(grokdeclarator): Likewise.
(start_function): Likewise.
(cp_missing_return_ok_p): Likewise.
* decl2.c (grokclassfn): Likewise.
(check_classfn): Likewise.
(finish_static_data_member_decl): Likewise.
(grokfield): Likewise.
* error.c (GLOBAL_IORD_P): Remove.
(dump_global_iord): Improve output.
(dump_decl): Avoid using DECL_ASSEMBLER_NAME.
* except.c (nothrow_libfn_p): Summarily reject any function not in
namespace-scope.
* init.c (build_java_class_ref): Don't explicitly set
DECL_ASSEMBLER_NAME after calling mangle_decl.
* mangle.c (mangle_decl_string): Handle extern "C" functions.
(mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
* method.c (set_mangled_name_for_decl): Don't explicitly set
DECL_ASSEMBLER_NAME after calling mangle_decl.
(make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
IDENTIFIER_GLOBAL_VALUE for the thunk.
* pt.c (set_mangled_name_for_template_decl): Remove.
(check_explicit_specialization): Don't use it.
(looup_template_class): Don't set DECL_ASSEMBLER_NAME.
(tsubst_friend_function): Likewise.
(tsubst_decl): Likewise.
(regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
* rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
where it's not necessary.
(tinfo_base_init): Likewise.
(create_real_tinfo_var): Likewise.
* search.c (looup_field_1): Likewise.
* semantics.c (finish_named_return_value): Likewise.
* tree.c (init_tree): Set lang_set_decl_assembler_name.
* com.c (builtin_function): Use SET_DECL_ASSEMBLER_NAME.
* class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
(layout_class): Likewise.
(layout_class_method): Likewise.
(emit_register_classes): Likewise.
* decl.c (builtin_function): Likewise.
(give_name_to_locals): Likewise.
From-SVN: r40642
|
|
* varasm.c (assemble_alias): Use DECL_ASSEMBLER_NAME, not the
contents of the RTL, to determine the name of the object.
* tree.h (DECL_RTL): Allocate RTL lazily.
(SET_DECL_RTL): New macro.
(DECL_RTL_SET_P): Likewise.
(COPY_DECL_RTL): Likewise.
(DECL_RTL_IF_SET): Likewise.
* varasm.c (make_decl_rtl): Add assertions about the kind of
declaration we are processing.
* c-decl.c (duplicate_decls): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
(start_decl): Likewise.
(finish_decl): Likewise.
* c-semantics.c (emit_local_var): Likewise.
* calls.c (expand_call): Likewise.
* dbxout.c (dbxout_symbol): Likewise.
* emit-rtl.c (unshare_all_rtl): Likewise.
(unshare_all_decls): Likewise.
(reset_used_decls): Likewise.
* expr.c (store_constructor): Likewise.
(safe_from_p): Likewise.
(expand_expr): Likewise.
* function.c (put_var_into_stack): Likewise.
(instantiate_decls_1): Likewise.
(assign_parms): Likewise.
(expand_function_start): Likewise.
(expand_function_end): Likewise.
* ggc-common.c (gcc_mark_trees): Likewise.
* integrate.c (function_cannot_inline_p): Likewise.
(copy_decl_for_inlining): Likewise.
(expand_inline_function): Likewise.
(integrate_parm_decls): Likewise.
(integrate_decl_tree): Likewise.
* print-tree.c (print_node): Likewise.
* reg-stack.c (stack_result): Likewise.
* stmt.c (label_rtx): Likewise.
(expand_return): Likewise.
(expand_decl): Likewise.
(expand_decl_cleanup): Likewise.
(expand_anon_union_decl): Likewise.
* toplev.c (check_global_declarations): Likewise.
(rest_of_decl_compilation): Likewise.
* tree.c (simple_cst_equal): Likewise.
* objc/objc-act.c (generate_static_references): Likewise.
* class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
* cp-tree.h (DECL_IN_MEMORY_P): Likewise.
* decl.c (duplicate_decls): Likewise.
(builtin_function): Likewise.
(build_library_fn): Likewise.
(build_cp_library_fn): Likewise.
(check_initializer): Likewise.
(cp_finish_decl): Likewise.
* decl2.c (grokfield): Likewise.
(grok_function_init): Remove #if 0'd code.
(finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
* friend.c (do_friend): Likewise.
* init.c (get_temp_regvar): Likewise.
* method.c (make_thunk): Likewise.
* pt.c (tsubst_friend_function): Likewise.
(tsubst_decl): Likewise.
(regenerate_decl_from_template): Likewise.
* semantics.c (genrtl_named_return_value): Likewise.
(expand_body): Likewise.
(genrtl_finish_function): Likewise.
* tree.c (cp_tree_equal): Likewise.
* com.c (ffecom_member_phase_2): Use COPY_DECL_RTL,
DECL_RTL_SET_P, etc.
(duplicate_decls): Likewise.
(start_decl): Likewise.
* class.c (build_static_field_ref): Likewise.
(make_method_value): Likewise.
(get_dispatch_table): Likewise.
* decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
From-SVN: r40482
|
|
cp:
Implement using decls inside template functions.
* decl2.c (validate_nonmember_using_decl): Don't special case
fake_std_node in the global namespace. Don't reject early when
processing a template.
(do_local_using_decl): Add to statement tree. Don't do further
processing when building a template.
* pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
testsuite:
* g++.old-deja/g++.pt/using1.C: New test.
From-SVN: r40151
|
|
cp:
Remove floating point and complex type template constant parms.
* pt.c (convert_nontype_argument): Remove REAL_TYPE and
COMPLEX_TYPE extensions.
(invalid_nontype_parm_type_p): Likewise.
testuite:
* g++.old-deja/g++.ext/realpt1.C: Remove.
From-SVN: r40117
|
|
* invoke.texi (-fsquangle): Remove documentation.
(-fname-mangling-version): Likewise.
* cp-tree.h (new_abi_rtti_p): Remove.
(name_mangling_version): Likewise.
(flag_do_squangling): Likewise.
* class.c (build_rtti_vtbl_entries): Remove old ABI support.
* decl.c (grokfndecl): Likewise.
* decl2.c (name_mangling_version): Remove.
(flag_do_squangling): Likewise.
(lang_f_options): Remove `squangle'.
(unsupported_options): Add `squangle'.
(cxx_decode_option): Issue a warning about uses of
-fname-mangling-version.
(finish_file): Remove old ABI support.
* pt.c (check_explicit_specialization): Likewise.
(tsubst_decl): Likewise.
* rtti.c (init_rtti_processing): Likewise.
(build_headof): Likewise.
(get_tinfo_decl_dynamic): Likewise.
(tinfo_from_decl): Likewise.
(build_dynamic_cast_1): Likewise.
(synthesize_tinfo_var): Likewise.
* init.c (build_new): Allow enumeration types for the array-bounds
in a direct-new-declarator.
From-SVN: r39845
|
|
* cp-tree.h (struct cp_language_function): Add x_vtt_parm.
(current_vtt_parm): New macro.
(struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
(DECL_HAS_VTT_PARM_P): New macro.
(DECL_VTT_PARM): Remove.
(FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
* decl.c (duplicate_decls): Only copy the operator code if
appropriate.
(start_function): Set current_vtt_parm.
(lang_mark_tree): Don't mark vtt_parm.
* decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
* class.c (build_clone): Maybe remove the VTT parm.
* optimize.c (maybe_clone_body): Set up the VTT parm.
* pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
* call.c (build_over_call): Just allow the VTT arg.
* method.c (make_thunk): Don't set DECL_VTT_PARM.
(do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
(synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
* decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
* error.c (dump_function_decl): Likewise.
* call.c (build_user_type_conversion_1, convert_like_real): Abort
if we try to call a constructor with in-charge or VTT parms.
* method.c (skip_artificial_parms_for): New fn.
* call.c (add_function_candidate, build_over_call): Call it.
* call.c (build_new_method_call): Use current_vtt_parm.
* init.c (expand_virtual_init): Likewise.
* class.c (same_signature_p): No longer static.
* cp-tree.h: Declare it.
* search.c (look_for_overrides_r): Use it.
From-SVN: r39841
|
|
from the template being specialized.
* pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
TREE_PROTECTED from the template being specialized.
From-SVN: r39813
|
|
* pt.c (push_template_decl_real): Don't remangle the name of a
class template.
From-SVN: r39752
|
|
cp:
* pt.c (unify): Don't check cv quals of array types.
testsuite:
* g++.old-deja/g++.pt/deduct6.C: New test.
From-SVN: r39666
|
|
in comment.
cp:
* pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
Remove spurious information in comment. Allow further
adjustments of REFERENCE_TYPE args.
testsuite:
* g++.old-deja/g++.pt/spec40.C: New test.
From-SVN: r39604
|
|
From-SVN: r39599
|
|
* search.c (shared_member_p): New function.
(lookup_field_r): Use it.
* cp-tree.h (SHARED_MEMBER_P): Remove.
* method.c (process_overload_item): Handle template-dependent array
bounds.
* pt.c (type_unification_real): If we end up with undeduced nontype
parms, try again.
* decl.c (lookup_name_real): Tweak warning to refer to decls, not
types.
* typeck2.c (friendly_abort): Don't say anything if we have
earlier errors or sorries.
* decl.c (check_tag_decl): Notice attempts to redefine bool and
wchar_t. Ignore if in_system_header.
* decl.c (maybe_push_cleanup_level): New fn...
(start_decl_1): ...split out from here.
* cvt.c (build_up_reference): Use it.
* cp-tree.h: Declare it.
From-SVN: r39540
|
|
template_template_parm when...
cp:
* pt.c (lookup_template_class): Make sure it's a primary
template or template_template_parm when called from the parser.
(instantiate_template_class): Add assertion.
testsuite:
* g++.old-deja/g++.pt/spec39.C: New test.
From-SVN: r39488
|
|
* tree.c, tree.h (build_parse_node): Remove; was identical to
build_nt.
* c-lang.c (start_cdtor), objc/objc-act.c
(build_module_descriptor): Use build_nt instead of
build_parse_node.
cp:
* decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
make_reference_declarator, make_call_declarator), method.c
(implicitly_declare_fn), parse.y (namespace_using_decl,
notype_unqualified_id, expr_or_declarator, new_type_id,
after_type_declarator, direct_after_type_declarator,
notype_declarator, complex_notype_declarator,
complex_direct_notype_declarator, qualified_id,
notype_qualified_id, overqualified_id, direct_new_declarator,
absdcl, direct_abstract_declarator, conversion_declarator), pt.c
(tsubst), semantics.c (begin_constructor_declarator): Use build_nt
instead of build_parse_node.
From-SVN: r39332
|
|
* configure.in: Arrange to include defaults.h in [ht]config.h/tm.h.
* Makefile.in: Remove all dependencies on defaults.h.
* builtins.c: Don't include defaults.h.
* c-common.c: Likewise.
* c-decl.c: Likewise.
* c-pragma.c: Likewise.
* c-typeck.c: Likewise.
* combine.c: Likewise.
* i386.c: Likewise.
* frame-ia64.c: Likewise.
* cppexp.c: Likewise.
* crtstuff.c: Likewise.
* dbxout.c: Likewise.
* dwarf2out.c: Likewise.
* dwarfout.c: Likewise.
* emit-rtl.c: Likewise.
* except.c: Likewise.
* expr.c: Likewise.
* final.c: Likewise.
* frame-dwarf2.c: Likewise.
* libgcc2.c: Likewise.
* optabs.c: Likewise.
* profile.c: Likewise.
* sdbout.c: Likewise.
* toplev.c: Likewise.
* tradcif.y: Likewise.
* tree.c: Likewise.
* varasm.c: Likewise.
ch:
* Makefile.in: Remove all dependencies on defaults.h.
* decl.c: Don't include defaults.h.
* timing.c: Likewise.
cp:
* Make-lang.in: Remove all dependencies on defaults.h.
* call.c: Don't include defaults.h.
* decl.c: Likewise.
* decl2.c: Likewise.
* except.c: Likewise.
* pt.c: Likewise.
* rtti.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
f:
* Make-lang.in: Remove all dependencies on defaults.h.
* com.c: Don't include defaults.h.
java:
* Make-lang.in: Remove all dependencies on defaults.h.
* decl.c: Don't include defaults.h.
* expr.c: Likewise.
* parse.y: Likewise.
From-SVN: r39308
|
|
cp:
* pt.c (tsubst_decl): Remove IN_DECL parameter.
(tsubst_arg_types): Check parameter is not void.
(tsubst): Adjust tsubst_decl call.
testsuite:
* g++.old-deja/g++.pt/spec38.C: New test.
From-SVN: r39234
|
|
* pt.c (check_explicit_specialization): Clone constructors and
destructors.
* g++.old-deja/g++.pt/spec33.C: Change from "Build don't link" to
"Build don't run".
From-SVN: r39229
|
|
cp:
* cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
(more_specialized): Add deduction parameter.
* call.c (joust): Adjust more_specialized call.
* pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
(get_bindings_order): Remove.
(get_bindings_real): Add DEDUCE parameter.
(maybe_adjust_types_for_deduction): Return extra unify flags. Do
REFERENCE_TYPE jig for DEDUCE_ORDER.
(type_unification_real): Deal with DEDUCE_ORDER. Use result of
maybe_adjust_types_for_deduction.
(more_specialized): Add DEDUCE parameter. Call get_bindings_real
directly.
(try_one_overload): Use result of maybe_adjust_types_for_deduction.
(check_cv_quals_for_unify): Use new unify qualifier flags.
(unify): Clear new unify qualifier flags.
(get_bindings_real): Add DEDUCE parameter.
(get_bindings): Adjust call to get_bindings_real.
(get_bindings_overload): Likewise.
(most_specialized_instantiation): Adjust call to
more_specialized.
testsuite:
* g++.old-deja/g++.martin/sts_partial.C: Remove XFAIL.
* g++.old-deja/g++.pt/spec35.C: New test.
* g++.old-deja/g++.pt/spec36.C: New test.
From-SVN: r39182
|
|
cp:
* cp-tree.h (lookup_template_class): Add complain parm.
* decl.c (lookup_namespace_name): Adjust call to
lookup_template_class.
(make_typename_type): Likewise.
* semantics.c (finish_template_type): Likewise.
* pt.c (lookup_template_class): Add complain parm. Adjust.
(tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
(tsubst): Likewise.
testsuite:
* g++.old-deja/g++.pt/deduct3.C: New test.
From-SVN: r39129
|
|
cp:
* pt.c (copy_default_args_to_explicit_spec): Preserve
object's CV quals. Reorganize.
testsuite:
* g++.old-deja/g++.pt/spec34.C: New test.
From-SVN: r39127
|
|
cp:
* pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
(type_unification_real): Set it.
(unify): Use it.
testsuite:
* g++.old-deja/g++.pt/unify8.C: New test.
From-SVN: r39115
|
|
* pt.c (check_nontype_parm): Rename to ...
(invalid_nontype_parm_type_p): ... here.
(process_template_parm): Adjust.
(convert_template_argument): Adjust.
From-SVN: r39040
|
|
cp:
* pt.c (check_nontype_parm): New function.
(process_template_parm): Use it.
(convert_template_argument): Use it.
(convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
member.
testsuite:
* g++.old-deja/g++.pt/nontype5.C: New test.
From-SVN: r39034
|
|
variable sized.
cp:
* pt.c (unify): Check array has a domain, before checking
whether it is variable sized.
testsuite:
* g++.old-deja/g++.pt/crash64.C: New test.
From-SVN: r38902
|
|
* pt.c (copy_default_args_to_explicit_spec_1): New function.
(copy_default_args_to_explicit_spec): Likewise.
(check_explicit_specialization): Use it.
From-SVN: r38893
|
|
* c-common.h (CTI_VOID_LIST): Remove.
(void_list_node): Likewise.
* tree.h (TI_VOID_LIST_NODE): New enumeral.
(void_list_node): New macro.
* config/arm/arm.c (arm_init_builtins): Use void_list_node.
* config/i386/i386.c (ix86_init_builtins): Likewise.
* config/ia64a/ia64.c (ia64_init_builtins): Likewise.
* class.c (finish_struct_1): Remove last argument in call to
make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
* decl.c (builtin_function): Likewise.
(build_cp_library_fn): Likewise.
(check_initializer): Likewise.
(make_rtl_for_nonlocal_decl): Likewise.
(cp_finish_decl): Likewise.
(start_function): Likewise.
* decl2.c (finish_anon_union): Likewise.
* friend.c (do_friend): Likewise.
* init.c (build_java_class_ref): Likewise.
* method.c (make_thunk): Likewise.
* pt.c (tsubst_friend_function): Likewise.
* semantics.c (expand_body): Likewise.
From-SVN: r38887
|
|
* output.h (make_function_rtl): Remove prototype.
(make_decl_rtl): Likewise.
* varasm.c (make_function_rtl): Remove.
(make_decl_rtl): Determine top-levelness from DECL_CONTEXT, rather
than from a third parameter.
* tree.h (make_decl_rtl): Remove last parameter.
* c-decl.c (builtin_function): Remove last argument in call to
make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
(start_function): Likewise.
* except.c (call_get_eh_context): Likewise.
* expr.c (emit_block_move): Likewise.
(clear_storage): Likewise.
* profile.c (output_func_start_profiler): Likewise.
* toplev.c (rest_of_decl_compilation): Likewise.
* objc/objc-act.c (create_builtin_decl): Likewise.
(synth_module_prologue): Likewise.
(generate_static_reference): Likewise.
(build_selector_reference_decl): Likewise.
(build_class_reference_decl): Likewise.
(build_objc_string_decl): Likewise.
(build_protocol_reference): Likewise.
* class.c (finish_struct_1): Remove last argument in call to
make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
* decl.c (builtin_function): Likewise.
(build_cp_library_fn): Likewise.
(check_initializer): Likewise.
(make_rtl_for_nonlocal_decl): Likewise.
(cp_finish_decl): Likewise.
(start_function): Likewise.
* decl2.c (finish_anon_union): Likewise.
* friend.c (do_friend): Likewise.
* init.c (build_java_class_ref): Likewise.
* method.c (make_thunk): Likewise.
* pt.c (tsubst_friend_function): Likewise.
* semantics.c (expand_body): Likewise.
* com.c (ffecom_init_zero_): Remove last argument in call to
make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
(ffecom_lookup_label_): Likewise.
(builtin_function): Likewise.
(start_function): Likewise.
* class.c (build_utf8_ref): Remove last argument in call to
make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
(build_class_ref): Likewise.
(build_static_field_ref): Likewise.
(get_dispatch_table): Likewise.
(layout_class_method): Likewise.
(emit_register_classes): Likewise.
* constants.c (build_constant_data_ref): Likewise.
* decl.c (builtin_function): Likewise.
(create_primitive_vtable): Likewise.
* expr.c (build_known_method_def): Likewise.
(build_jni_stub): Likewise.
(java_lang_expand_expr): Likewise.
From-SVN: r38884
|
|
cp:
* cp-tree.h (lang_decl_flags): Rename defined_in_class to
initialized_in_class.
(DECL_DEFINED_IN_CLASS_P): Rename to ...
(DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
* decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
(cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
* pt.c (check_default_tmpl_args): Adjust for
DECL_INITIALIZED_IN_CLASS_P.
(instantiate_class_template): Likewise.
(instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
* class.c (finish_struct): Constify saved_filename.
testsuite:
* g++.old_deja/g++.pt/instantiate12.C: New test.
From-SVN: r38801
|
|
* call.c (build_conv): Don't use build1 for USER_CONV.
* pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
From-SVN: r38688
|
|
* class.c (invalidate_class_lookup_cache): Zero the
previous_class_values.
* cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
TREE_INT_CST_HIGH.
(CLASSTYPE_TEMPLATE_LEVEL): Likewise.
* decl.c (free_bindings): New variable.
(push_binding): Don't create a new binding if we have one on the
free list.
(pop_binding): Put old bindings on the free list.
(init_decl_processing): Use size_int, not build_int_2.
Register free_bindings as a GC root.
(cp_make_fname_decl): Use size_int, not build_int_2.
(push_inline_template_parms_recursive): Likewise.
(end_template_parm_list): Likewise.
(for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
(tsubst_template_parms): Use size_int, not build_int_2.
(tsubst): Likewise.
* rtti.c (get_vmi_pseudo_type_info): Likewise.
From-SVN: r38641
|
|
* class.c (pushclass): Remove #if 0'd code.
* cp-tree.h (overload_template_name): Remove.
* decl.c (store_bindings): Simplify.
(pop_from_top_level): Likewise.
* pt.c (overload_template_name): Remove.
(instantiate_decl): Don't call push_to_top_level if it's not
needed.
From-SVN: r38530
|
|
From-SVN: r38525
|
|
* pt.c (register_local_specialization): Don't return a value.
(lookup_template_class): Use move-to-front heuristic when looking
up template instantiations.
(instantiate_decl): Only push_to_top_level when we're actually
going to instantiate the template.
From-SVN: r38524
|
|
* pt.c (more_specialized): Don't optimize len==0.
(fn_type_unification): If we're adding the return type, increase len.
From-SVN: r38472
|
|
argument.
In partial ordering for a call, ignore parms for which we don't have
a real argument.
* call.c (joust): Pass len to more_specialized.
(add_template_candidate_real): Strip 'this', pass len.
* pt.c (more_specialized): Pass len down. Lose explicit_args parm.
(get_bindings_order): New fn. Pass len down.
(get_bindings_real): Strip 'this', pass len.
(fn_type_unification): Likewise.
(type_unification_real): Succeed after checking 'len' args.
(most_specialized_instantiation): Lose explicit_args parm.
* class.c (resolve_address_of_overloaded_function): Strip 'this',
pass len.
From-SVN: r38460
|
|
* pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
DECL_TEMPLATE_RESULT.
* search.c (lookup_field_r): Call lookup_fnfields_1, not
lookup_fnfields_here.
* parse.y (typename_sub2): Return the TYPE_DECL, not the type.
* call.c (build_object_call): Also allow conversions that return
reference to pointer to function.
(add_conv_candidate): Handle totype being ref to ptr to fn.
(build_field_call): Also allow members of type reference to function.
Lose support for calling pointer to METHOD_TYPE fields.
* error.c (dump_expr): Handle *_CAST_EXPR.
* typeck2.c (build_scoped_ref): Always convert to the naming class.
* tree.c (break_out_cleanups): Lose.
* cp-tree.h: Remove prototype.
* typeck.c (build_component_ref): Don't break_out_cleanups.
(build_compound_expr): Likewise.
* semantics.c (finish_expr_stmt): Likewise.
From-SVN: r38417
|
|
* pt.c (unify): Handle when both ARG and PARM are
BOUND_TEMPLATE_TEMPLATE_PARM.
* g++.old-deja/g++.pt/ttp65.C: New test.
From-SVN: r38301
|
|
* pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
DECL_TEMPLATE_PARM_P.
* g++.old-deja/g++.pt/ttp64.C: New test.
From-SVN: r38300
|
|
to explicit specializations.
* pt.c (check_explicit_specialization): Propagate default
function arguments to explicit specializations.
* g++.old-deja/g++.pt/spec33.C: New test.
From-SVN: r38266
|
|
From-SVN: r38258
|
|
* error.c (dump_function_name): Don't let the user see __comp_ctor.
Clean up copy-initialization in overloading code.
* call.c (build_user_type_conversion_1): Die if we are asked to
convert to the same or a base type.
(implicit_conversion): Avoid doing so. Lose reference binding code.
(convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
direct-initialization. Also do direct-init part of copy-init.
(build_user_type_conversion): Don't provide context to convert_like.
* cvt.c (ocp_convert): build_user_type_conversion will now provide
the constructor call for copy-init.
* pt.c (tsubst_decl): Call clone_function_decl here if this is an
instantiation of a member template.
(do_decl_instantiation): Not here.
From-SVN: r38158
|
|
* pt.c (verify_class_unification): New function.
(get_class_bindings): Use it.
(try_class_unification): Tidy.
(unify): Handle when argument of a template-id is not
template parameter dependent.
(template_args_equal): Handle when TREE_CODE's do not match.
* g++.old-deja/g++.oliva/partspec1.C: Remove XFAIL.
* g++.old-deja/g++.pt/partial4.C: New test.
From-SVN: r38102
|