Age | Commit message (Collapse) | Author | Files | Lines |
|
From-SVN: r151334
|
|
that brings in another instance of...
* pt.c (retrieve_specialization): Don't get confused by a
using-declaration that brings in another instance of this template
from a base class.
* ptree.c (cxx_print_type): Fix logic.
From-SVN: r149247
|
|
* cp-tree.h (struct lang_decl): Overhaul.
(struct lang_decl_flags): Remove.
(struct lang_decl_base): New.
(struct lang_decl_min): New.
(struct lang_decl_fn): New.
(struct lang_decl_ns): New.
(CAN_HAVE_FULL_LANG_DECL_P): Replace with LANG_DECL_HAS_MIN.
(LANG_DECL_MIN_CHECK): New.
(LANG_DECL_FN_CHECK): New.
(LANG_DECL_NS_CHECK): New.
(STRIP_TEMPLATE): New.
(NON_THUNK_FUNCTION_CHECK): Remove.
(DECL_DECLARES_FUNCTION_P): New.
(lots): Adjust.
* lex.c (retrofit_lang_decl, cxx_dup_lang_specific_decl): Adjust.
* decl.c (push_local_name, duplicate_decls): Adjust.
* decl2.c (start_objects): Don't set u2sel.
* semantics.c (finish_omp_threadprivate): Adjust.
* class.c (build_clone): Don't do much on TEMPLATE_DECLs.
(decl_cloned_function_p): Out-of-line implementation of macros.
(clone_function_decl, adjust_clone_args): Use DECL_CLONED_FUNCTION_P.
* mangle.c (write_unqualified_name): Don't check function flags
on non-functions.
* method.c (make_alias_for): Don't set DECL_CLONED_FUNCTION.
* pt.c (build_template_decl): Don't set function flags.
(check_default_tmpl_args): Check that it's a function.
(instantiate_template): Use DECL_ABSTRACT_ORIGIN to find the
cloned template.
* pt.c (tsubst_decl) [FUNCTION_DECL]: Don't tsubst
DECL_CLONED_FUNCTION.
* cp-tree.h (struct lang_type_class): Move sorted_fields here.
* class.c (finish_struct_1): Adjust.
* ptree.c (cxx_print_decl, cxx_print_type): Adjust.
* search.c (lookup_field_1): Adjust.
* cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Remove.
* decl.c (finish_method): Don't add to it.
* class.c (fixup_pending_inline): Remove.
(fixup_inline_methods): Remove.
(finish_struct_1): Don't call it.
* error.c (dump_function_name): Handle null name.
From-SVN: r149217
|
|
* ptree.c (cxx_print_decl): Pretty-print full name of
function/template.
(cxx_print_type): Pretty-print full name of class.
From-SVN: r145368
|
|
From-SVN: r144271
|
|
external file)
PR target/39179
* tree-ssa-ccp.c (get_symbol_constant_value): Don't assume zero
value if DECL_EXTERNAL.
* tree-sra.c (sra_walk_gimple_assign): Likewise.
* target.h (gcc_target::binds_local_p): Clarify module.
* tree.h (TREE_PUBLIC): Clarify module.
From-SVN: r144270
|
|
Public...
* typeck.c: Change copyright header to refer to version 3 of the GNU General
Public License and to point readers at the COPYING3 file and the FSF's license
web page.
* optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c, config-lang.in,
cp-tree.def, call.c, decl.h, ptree.c, Make-lang.in, method.c, rtti.c,
cp-objcp-common.c, g++spec.c, cp-objcp-common.h, except.c, error.c,
operators.def, cvt.c, tree.c, mangle.c, cp-tree.h, dump.c, search.c,
friend.c, expr.c, cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c,
pt.c, cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
name-lookup.h, parser.c: Likewise.
From-SVN: r127154
|
|
template parameter...
2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
* ptree.c (cxx_print_type): Use formatting markup for integers
when printing template parameter index/level/orig level.
(cxx_print_xnode): Ditto.
* cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
(struct template_parm_index_s): Remove the PARAMETER_PACK member.
Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
HOST_WIDE_INTs.
(struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
rather than a HOST_WIDE_INT.
Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
better bit-packing.
(struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
IN_BASE_INITIALIZER bool bitfields.
(struct cp_declarator): Make KIND a 4-bit field. Make
PARAMETER_PACK_P a bool bitfield just after KIND.
* pt.c (uses_parameter_packs): Destroy the pointer set.
(make_pack_expansion): Ditto.
(check_for_bare_parameter_packs): Ditto.
* name-lookup.c (push_to_top_level): Make need_pop a bool value.
From-SVN: r122955
|
|
From-SVN: r114428
|
|
PR c++/25439
* decl.c (grokdeclarator): Remove dead code.
* ptree.c (cxx_print_xnode): Handle BASELINK.
* parser.c (make_id_declarator): Add sfk parameter.
(cp_parser_direct_declarator): Do not pass TYPE_DECLs to
make_id_declarator.
(cp_parser_declarator_id): Simplify BASELINKs here.
(cp_parser_member_declaration): Adjust calls to
make_id_declarator.
PR c++/25439
* g++.dg/parse/crash17.C: Adjust error markers.
* g++.dg/template/error20.C: New test.
From-SVN: r109079
|
|
In gcc/
2005-12-05 Daniel Berlin <dberlin@dberlin.org>
* print-tree.c (print_node): Ditto.
* tree-dfa.c (add_referenced_var): Tag's don't have DECL_INITIAL.
* tree-dump.c (dequeue_and_dump): Check for decl_common structure
before accessing DECL_ARTIFICIAL.
Handle new tag tree codes.
* tree-flow-inline.h (clear_call_clobbered): Update for tag
changes.
(unmodifiable_var_p): Ditto.
* tree-flow.h (mem_tag_kind): Remove.
(struct var_ann_d): Remove mem_tag_kind member.
* tree-gimple.c (is_gimple_reg): Tags are not gimple registers.
* tree-pretty-print.c (dump_generic_node): Handle memory tags.
* tree-ssa-alias.c (init_alias_info): Update for memory tag changes.
(group_aliases): Ditto.
(setup_pointers_and_addressables): Ditto.
(is_escape_site): Ditto.
(may_alias_p): Ditto.
(create_tag_raw): New function.
(create_memory_tag): Use it.
(dump_alias_info): Update for tags.
(may_be_aliased): Ditto.
(add_type_alias): Ditto.
(new_type_alias): Ditto.
(create_sft): Ditto.
(create_structure_vars): Ditto.
* tree-ssa-ccp.c (get_default_value): Ditto.
* tree-ssa-operands.c (get_expr_operands): Ditto.
(add_stmt_operand): Ditto.
(add_call_clobber_ops): Remove duplicated condition.
* tree-ssa.c (verify_flow_insensitive_alias_info): Update for
tags.
* tree-tailcall.c (suitable_for_tail_opt_p): Ditto.
* tree-vect-transform.c (vect_create_data_ref_ptr): Ditto.
* tree.c (init_ttree): Update structures for new tree codes.
(tree_code_size): Update sizes for new tree codes.
(make_node_stat): Don't try to set common things on minimal
structures.
(tree_node_structure): Update for tags.
(is_global_var): Ditto.
* tree.def: Add new tree codes.
* tree.h (MTAG_P): New macro.
(TREE_MEMORY_TAG_CHECK): Ditto.
(SSA_VAR_P): Update for tags.
(struct tree_memory_tag): New structure.
(MTAG_GLOBAL): New macro.
(union tree_node): Add memory tag member.
* treestruct.def (TS_MEMORY_TAG): New.
In gcc/cp
2005-12-05 Daniel Berlin <dberlin@dberlin.org>
* ptree.c (cxx_print_decl): Update to check for decl_common
structure.
From-SVN: r108102
|
|
* aclocal.m4 (gcc_AC_FUNC_PRINTF_PTR): Delete.
* configure.ac: Don't call gcc_AC_FUNC_PRINTF_PTR.
* system.h (HOST_PTR_PRINTF): Don't define, poison it.
* bitmap.c, c-decl.c, config/i386/i386-interix.h,
config/iq2000/iq2000.c, mips-tfile.c, print-rtl.c, print-tree.c:
Delete HOST_PTR_PRINTF.
* configure, config.in: Regenerate.
cp:
* name-lookup.c, ptree.c: Delete HOST_PTR_PRINTF.
From-SVN: r103135
|
|
* ptree.c (cxx_print_identifier): Print a leading space if the
indent level is 0.
From-SVN: r102378
|
|
From-SVN: r101312
|
|
From-SVN: r100952
|
|
From-SVN: r94881
|
|
PR c++/19733
* class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
(check_bases): Give warnings about a base class with a
non-virtual destructor, even if it is implicit.
(finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
(maybe_warn_about_overly_private_class): Don't use
TYPE_HAS_DESTRUCTOR.
(finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
(check_for_override): Give it external linkage.
(add_implicitly_declared_members): Generate destructors lazily.
(check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
TYPE_HAS_DESTRUCTOR.
(check_bases_and_members): Call check_methods before
check_field_decls.
(check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
TYPE_HAS_DESTRUCTOR.
(finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
* cp-tree.def (PSEUDO_DTOR_EXPR): Document.
* cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
(lang_type_class): Add lazy_destructor.
(CLASSTYPE_LAZY_DESTRUCTOR): New macro.
(CLASSTYPE_DESTRUCTORS): Robustify.
(TYPE_HAS_DESTRUCTOR): Remove.
(check_for_override): Declare.
(build_vbase_delete): Remove.
* cvt.c (convert_to_void): Issue errors about pseudo-destructor
expressions.
* decl.c (cxx_maybe_build_cleanup): Remove dead code.
* except.c (dtor_nothrow): Lazily create destructors if necessary.
(build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
* init.c (build_delete): Lazily create destructors, if necessary.
(build_vbase_delete): Remove.
* method.c (locate_dtor): Simplify.
(implicitly_declare_fn): Add support for destructors.
* parser.c (cp_parser_lookup_name): Lazily create destructors, if
necessary.
* pt.c (check_explicit_specialization): Don't use
TYPE_HAS_DESTRUCTOR.
(instantiate_class_template): Likewise.
* ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
* rtti.c (emit_support_tinfos): Robustify.
* search.c (lookup_fnfields_1): Lazily create destructors.
* typeck.c (build_class_member_access_expr): Remove
PSEUDO_DTOR_EXPR handling.
(lookup_destructor): Likewise.
PR c++/19733
* g++.dg/parse/crash23.C: New test.
* g++.dg/warn/Weff1.C: New test.
From-SVN: r94759
|
|
* cp-tree.h (struct lang_type_header): Remove
uses_multiple_inheritance field.
(TYPE_USES_MULTIPLE_INHERITANCE): Remove.
(TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
(TYPE_USES_VIRTUAL_BASECLASSES): Remove.
(DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
(TYPE_CONTAINS_VPTR_P): Likewise.
* call.c (add_template_candidate_real): Use
CLASSTYPE_VBASECLASSES.
(build_special_member_call): Likewise.
* class.c (finish_struct_bits): Remove
TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
bookkeeping.
(check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
(create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
bookkeeping.
(build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
(accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
Likewise.
* decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
bookkeeping.
(cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
* decl2.c (maybe_retrofit_in_chrg): Likewise.
* init.c (expand_member, push_base_cleanups): Likewise.
* pt.c (instantiate_class_template): Remove
TYPE_USES_MULTIPLE_INHERITANCE,
TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
bookkeeping.
* ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
check.
* typeck2.c (process_init_constructor): Replace some sorrys with
asserts.
From-SVN: r87808
|
|
* vec.h (VEC_address): New function.
* cp-tree.h (lang_type_class): Remove has_real_assign_ref and
has_abstract_assign_ref. Make methods a VEC(tree) *.
(TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
(CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
(CLASSTYPE_DESTRUCTORS): Likewise.
(TYPE_HAS_REAL_ASSIGN_REF): Remove.
(TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
(add_method): Change prototoype.
* class.c (add_method): Remove error_p parameter. Adjust for
changes to CLASSTYPE_METHOD_VEC.
(handle_using_decl): Adjust call to add_method.
(maybe_warn_about_overly_private_class): Adjust for
changes to CLASSTYPE_METHOD_VEC.
(resort_type_method_vec): Likewise.
(finish_struct_methods): Likewise.
(check_for_override): Likewise.
(warn_hidden): Likewise.
(add_implicitly_declared_members): Defer creation of assignment
operators. Adjust call to add_method.
(clone_function_decl): Adjust call to add_method.
(check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
(finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
* decl.c (grok_special_member_properties): Don't set
TYPE_HAS_ABSTRACT_ASSIGN_REF.
* decl2.c (check_classfn): Adjust for
changes to CLASSTYPE_METHOD_VEC.
* method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
(locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
(locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
(implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
cp_finish_decl.
* pt.c (check_explicit_specialization): Adjust for
changes to CLASSTYPE_METHOD_VEC.
(instantiate_class_template): Do not set
TYPE_HAS_ABSTRACT_ASSIGN_REF.
* ptree.c (cxx_print_type): Don't try to print
CLASSTYPE_METHOD_VEC.
* rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
* search.c (lookup_field_r): Adjust for
changes to CLASSTYPE_METHOD_VEC.
(lookup_fnfields): Likewise.
(lookup_conversion_operator): Likewise.
(lookup_fnfields_1): Likewise. Create assignment operators
lazily.
(look_for_overrides_here): Adjust for
changes to CLASSTYPE_METHOD_VEC.
(add_conversions): Likewise.
* semantics.c (finish_member_declaration): Adjust call to add_method.
From-SVN: r84796
|
|
* cp-tree.h (lang_identifier): Remove class_value.
(IDENTIFIER_CLASS_VALUE): Remove.
(pop_class_decls): Likewise.
(init_search_processing): Likewise.
* class.c (handle_using_decl): Use lookup_member, not
IDENTIFIER_CLASS_VALUE.
(restore_class_cache): New function, split out from ...
(pushclass): ... here. Do not call clear_identifier_class_values.
(invalidate_class_lookup_cache): Do not clear
IDENTIFIER_CLASS_VALUE.
(popclass): Do not call pop_class_decls.
(maybe_note_name_used_in_class): Do not save names looked up after
the class is complete. Use lookup_member, not
IDENTIFIER_CLASS_VALUE.
* config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
* decl.c (cxx_init_decl_processing): Do not call
init_search_processing.
* method.c (do_build_copy_constructor): Remove unnecessary code.
(do_build_assign_ref): Likewise.
* name-lookup.c (pushdecl): Use lookup_member, not
IDENTIFIER_CLASS_VALUE.
(set_identifier_type_value_with_scope): Set TREE_TYPE on the
type_shadowed list.
(poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
(push_class_binding): Do not set it.
(clear_identifier_class_values): Remove.
(push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
(store_binding): Do not save it.
(pop_from_top_level): Do not restore it.
* name-lookup.h (cxx_saved_binding): Remove class_value.
(clear_identifier_class_values): Remove.
* ptree.c (cxx_print_identifier): Do not print
IDENTIFIER_CLASS_VALUE.
* search.c (search_obstack): Remove.
(push_stack_level): Remove.
(pop_stack_level): Remove.
(search_level): Remove.
(search_stack): Remove.
(lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
(setup_class_bindings): Use IDENTIFIER_MARKED, not
IDENTIFIER_CLASS_VALUE.
(marked_identifiers): New variable.
(push_class_decls): Clear IDENTIFIER_MARKED.
(pop_class_decls): Don't call pop_search_level.
(init_search_processing): Remove.
From-SVN: r84629
|
|
lookup_fnfields & build_special_member_call.
* call.c (build_user_type_conversion_1, build_new_op,
check_constructor_callable, build_temp,
perform_direct_initialization_of_possible): Pass type directly to
lookup_fnfields & build_special_member_call.
(build_special_member_call): Accept a type, and complete it.
* class.c (finish_stuct_bits): Copy the BINFOs here.
* cvt.c (ocp_convert): Pass type directly to
build_special_member_call.
* decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
(xref_basetypes): Allocate the binfo here. Adjust.
* init.c (build_init, build_new_1): Pass type directly to
build_special_member_call.
* lex.c (cxx_make_type): Do not allocate binfo here.
* name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
* parser.c (cp_parser_class_head): Always call xref_basetypes.
* pt.c (instantiate_class_template): Likewise. Inhibit access
checking for template friends.
* ptree.c (cxx_print_type): Adjust record printing.
* search.c (lookup_base): When taking a type, complete it before
looking for a binfo.
(lookup_member): Delay completing a type.
(push_class_decls): Don't walk an incomplete type.
(lookup_conversions): Likewise.
* semantics.c (finish_stmt_expr_expr): Pass type directly to
build_special_member_call.
* tree.c (copy_base_binfos): Adjust.
(make_binfo): Likewise.
* typeck.c (build_modify_expr): Pass type directly to
build_special_member_call.
* typeck2.c (process_init_constructor): Check a binfo exists.
(build_m_component_ref): Allow accessing an incomplete type.
(build_functional_cast): Pass type directly to
build_special_member_call.
From-SVN: r84562
|
|
* tree.h (TYPE_BINFO_OFFSET, TYPE_BINFO_VTABLE,
TYPE_BINFO_VIRTUALS, TYPE_BINFO_BASETYPES,
TYPE_BINFO_BASETYPE): Remove.
(BINFO_BASETYPES, BINFO_N_BASETYPES, BINFO_BASETYPE): Rename
to ...
(BINFO_BASE_BINFOS, BINFO_N_BASE_BINFOS, BINFO_BASE_BINFO): ...
here.
(BINFO_BASEACCESSES, BINFO_BASEACCESS): Rename to ...
(BINFO_BASE_ACCESSES, BINFO_BASE_ACCESS): ... here.
(BINFO_INHERITANCE_CHAIN): Redocument as it is actually used.
(struct tree_binfo): Rename base_types to base_binfos.
* alias.c (record_component_aliases): Adjust BINFO macros.
* dbxout.c (dbxout_type): Likewise.
* dwarf2out.c (gen_member_die): Likewise.
* sdbout.c (sdbout_one_type): Likewise.
* tree-dump.c (deque_and_dump): Likewise.
* config/i386/i386.c (classify_argument,
contains_128bit_aligned_vector_p): Likewise.
* cp/cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
* cp/class.c (build_primary_vtable, check_bases,
determine_primary_base, finish_struct_bits,
maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
get_basefndecls, warn_hidden, walk_subobject_offsets,
build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
finish_struct_1, get_vfield_name, contains_empty_class_p,
dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
BINFO macros.
* cp/decl.c (xref_basetypes): Likewise.
* cp/dump.c (cp_dump_tree): Likewise.
* cp/error.c (dump_expr): Likewise.
* cp/init.c (sort_mem_initializers, expand_member_init,
push_base_cleanups): Likewise.
* cp/method.c (do_build_copy_constructor, do_build_assign_reg,
synthesize_exception_spec): Likewise.
* cp/name-lookup.c (arg_assoc_class):
* cp/pt.c (instantiate_class_template, tsubst,
get_template_base_recursive):
* cp/ptree.c (cxx_print_type):
* cp/rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
* cp/search.c (lookup_base_r, dynamic_cast_base_recurse,
dfs_access_in_type, access_in_type, lookup_field_queue_p,
bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
binfo_for_vtable, copied_binfo, original_binfo): Likewise
* cp/tree.c (copy_base_binfos, make_binfo): Likewise.
* cp/typeck.c (commmon_base_type): Likewise
* cp/typeck2.c (process_init_constructor): Likewise
* java/java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
(TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
* java/class.c (set_super_info, class_depth, interface_of_p,
maybe_add_interface, add_interface, make_class_data,
layout_class, add_miranda_methods): Adjust BINFO macros.
* java/expr.c (can_widen_reference_to, lookup_field): Likewise.
* java/jcf-write.c (generate_classfile): Likewise.
* java/parse.y (patch_anonymous_class,
check_inner_circular_reference, check_circular_reference,
java_complete_class, check_abstract_method_definitions,
java_check_abstract_method_definitions,
check_interface_throws_clauses, java_check_abstract_methods,
lookup_java_interface_method2,
find_applicable_accessible_methods_list): Likewise.
* java/typeck.c (find_method_in_interface): Likewise.
* java/verify.c (merge_types): Likewise.
From-SVN: r84198
|
|
gcc/
* c-incpath.c, c-incpath.h, c-pch.c, c.opt, cppexp.c,
et-forest.h, genattr.c, ggc-none.c, hosthooks-def.h,
hosthooks.h, params.h, ra-colorize.c, web.c,
config/darwin-c.c, config/alpha/freebsd.h, config/arm/pe.c,
config/avr/avr-protos.h, config/avr/avr.md,
config/fr30/fr30-protos.h, config/fr30/fr30.md,
config/h8300/fixunssfsi.c, config/i386/darwin.h,
config/i386/freebsd.h, config/i386/freebsd64.h,
config/ia64/hpux.h, config/ia64/unwind-ia64.c,
config/ip2k/libgcc.S, config/m32r/xm-m32r.h,
config/mmix/mmix-modes.def, config/ns32k/netbsd.h,
config/ns32k/ns32k.md, config/pa/pa64-hpux.h,
config/pa/pa64-regs.h, config/rs6000/aix41.h,
config/rs6000/aix43.h, config/rs6000/host-darwin.c,
config/sparc/aout.h, config/sparc/freebsd.h,
config/sparc/litecoff.h, config/vax/vax-protos.h,
doc/hostconfig.texi, doc/include/gcc-common.texi: Update
copyright.
gcc/cp/
* cp-lang.c, ptree.c: Update copyright.
From-SVN: r79506
|
|
PR c++/14401
* class.c (check_field_decls): Complain about non-static data
members of reference type in unions. Propagate
CLASSTYPE_REF_FIELDS_NEED_INIT and
CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
data members.
* init.c (perform_member_init): Complain about mbmers with const
type that are not explicitly initialized.
PR c++/14401
* g++.dg/init/ctor3.C: New test.
* g++.dg/init/union1.C: New test.
* g++.dg/ext/anon-struct4.C: New test.
From-SVN: r79158
|
|
PR c++/11971
* tree.c (build_local_temp): Split out from build_cplus_new.
(force_target_expr): New fn.
* call.c (call_builtin_trap): Call it. Take a type parm.
(convert_arg_to_ellipsis): Pass it.
(build_x_va_arg): Use call_builtin_trap.
PR c++/11929
* call.c (magic_varargs_p): New fn.
(build_over_call): Do no ellipsis conversions for arguments to
functions with magic varargs.
From-SVN: r74462
|
|
PR c++/11703
* call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
determine whether or not to promote types.
(convert_for_arg_passing): Likewise.
* decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
templates.
* pt.c (tsubst_decl): Do not expect it to be set.
PR c++/9512
PR c++/10923
* cp-tree.h (check_elaborated_type_specifier): Declare.
(handle_class_head): Remove.
(note_got_semicolon): Likewise.
(note_list_got_semicolon): Likewise.
(finish_class_definition): Likewise.
* decl.c (check_elaborated_type_specifier): Make it public.
Robustify.
(handle_class_head): Remove.
* parser.c (cp_parser_elaborated_type_specifier): Use
check_elaborated_type_specifier.
(cp_parser_class_specifier): Do not call finish_class_definition.
(cp_parser_class_head): Or handle_class_head. Check for
over-qualified names.
* semantics.c (finish_class_definition): Remove.
* parser.c (cp_parser_check_for_definition_in_return_type): New
function.
(cp_parser_simple_declaration): Adjust call to
cp_parser_init_declarator.
(cp_parser_decl_specifier_seq): Change type of
declares_class_or_enum parameter.
(cp_parser_explicit_instantiation): Adjust accordingly.
(cp_parser_type_specifier): Change type of
declares_class_or_enum parameter.
(cp_parser_init_declarator): Add declares_class_or_enum
parameter.
(cp_parser_parameter_declaration): Adjust call to
cp_parser_decl_specifier_seq.
(cp_parser_function_definition): Likewise.
(cp_parser_member_declaration): Likewise.
(cp_parser_single_declaration): Likewise.
* cp-tree.h (lang_type_class): Remove has_call_overloaded,
has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
(TYPE_OVERLOADS_CALL_EXPR): Remove.
(TYPE_OVERLOADS_ARRAY_REF): Likewise.
(TYPE_OVERLOADS_ARROW): Likewise.
(CLASSTYPE_GOT_SEMICOLON): Likewise.
* class.c (check_bases): Do not set them.
(finish_struct_1): Likewise.
* decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
(build_ptrmemfunc_type): Likewise.
(grok_op_properties): Do not set TYPE_OVERLOADS_*.
(start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
* decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
* lex.c (note_got_semicolon): Remove.
(note_list_got_semicolon): Likewise.
* parser.c (cp_parser_simple_declaration): Do not call
note_list_got_semicolon.
* pt.c (list_eq): Remove.
(lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
(instantiate_class_template): Do not set TYPE_OVERLOADS*.
(instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
* ptree.c (cxx_print_type): Do not print them.
* semantics.c (finish_member_class_template): Do not call
note_list_got_semicolon.
* g++.dg/parse/ret-type2.C: New test.
PR c++/11703
* g++.dg/init/new8.C: New test.
PR c++/10923
* g++.dg/parse/typedef5.C: New test.
PR c++/9512
* g++.dg/parse/qualified2.C: New test.
* g++.old-deja/g++.other/decl5.C: Mark one more instance of
invalid code.
From-SVN: r70391
|
|
stdio calls.
gcc:
* bitmap.c (debug_bitmap_file): Merge uses of HOST_PTR_PRINTF with
adjacent stdio calls.
* c-decl.c (c_print_identifier): Likewise.
* mips-tfile.c (write_varray, write_object, allocate_cluster): Likewise.
* print-rtl.c (print_rtx): Likewise.
* print-tree.c (print_node_brief, print_node): Likewise.
* system.h (HOST_PTR_PRINTF): Ensure we have a literal string.
* configure.in (AC_COMPILE_CHECK_SIZEOF): Check for `void *'.
* config.in, configure: Regenerated.
cp:
* decl.c (print_binding_level, print_other_binding_stack,
print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
stdio calls.
* ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
From-SVN: r69061
|
|
HOST_WIDE_INT_PRINT_* format specifier to collapse...
gcc:
* cfgloopanal.c (test_for_iteration): Use string concatentation on
HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
function calls into one.
* dbxout.c (dbxout_symbol): Likewise.
* defaults.h (ASM_OUTPUT_SIZE_DIRECTIVE): Likewise.
* dwarf2asm.c (dw2_asm_output_data_uleb128,
dw2_asm_output_data_sleb128): Likewise.
* genrecog.c (debug_decision_2): Likewise.
* loop.c (emit_prefetch_instructions): Likewise.
* print-rtl.c (print_rtx): Likewise.
* print-tree.c (print_node_brief, print_node): Likewise.
* ra-debug.c (dump_igraph, dump_graph_cost,
dump_static_insn_cost): Likewise.
* ra-rewrite.c (dump_cost): Likewise.
* sdbout.c (PUT_SDB_INT_VAL, PUT_SDB_SIZE): Likewise.
* sreal.c (dump_sreal): Likewise.
* unroll.c (unroll_loop, precondition_loop_p): Likewise.
* varasm.c (assemble_vtable_entry): Likewise.
cp:
* ptree.c (cxx_print_type, cxx_print_xnode): Use string
concatentation on HOST_WIDE_INT_PRINT_* format specifier to
collapse multiple function calls into one.
* tree.c (debug_binfo): Likewise.
java:
* parse.y (print_int_node): Use string concatentation on
HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
function calls into one.
From-SVN: r66900
|
|
gcc:
* gengtype-lex.l (IWORD): Add CHAR_BITFIELD.
* system.h (CHAR_BITFIELD): New.
cp:
* operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
DEF_ASSN_OPERATOR): Delete spurious semi-colon.
* rtti.c (dfs_class_hint_mark): Likewise.
* decl.c (push_local_name, push_class_level_binding,
maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
functions returning void.
* decl2.c (add_using_namespace): Likewise.
* decl.c (print_binding_level, print_other_binding_stack,
print_binding_stack): Cast argument of %p specifier to void*.
* ptree.c (cxx_print_decl): Likewise.
* cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
VAR_FUNCTION_OR_PARM_DECL_CHECK,
VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
* decl.c (set_current_binding_level): New macro. Use throughout
when setting the current binding level.
* cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
in enum.
* method.c (mangling_flags): Likewise.
* cp-tree.h (lang_type_header): Add __extension__ and use
CHAR_BITFIELD for members.
From-SVN: r65201
|
|
* cp-tree.h (struct cxx_binding): New datatype;
(struct lang_identifier): Use it.
(LOCAL_BINDING_P): Adjust definition.
(INHERITED_VALUE_BINDING_P): Likewise.
(BINDING_SCOPE): Likewise.
(BINDING_HAS_LEVEL_P): Likewise.
(BINDING_VALUE): Likewise.
(BINDING_TYPE): Likewise.
(IDENTIFIER_VALUE): Likewise.
(struct tree_binding): Remove.
(TS_CP_BINDING): Likewise.
((union lang_tree_node): Remove field "binding".
(cxx_binding_clear): New macro.
(binding_for_name): Adjust return type.
(qualified_lookup_using_namespace): Adjust prototype.
(lookup_using_namespace): Adjust prototype.
(cxx_scope_find_binding_for_name): Declare.
* cp-tree.def: Remove CPLUS_BINDING definition.
* parse.y (parse_scoped_id): Don't type-abuse of 'id'. Allocate
temporary cxx_binding on stack. Simplify.
* decl.c (push_binding): Adjust local variable type.
(add_binding): Likewise.
(push_class_binding): Likewise.
(pop_binding): Likewise.
(poplevel): Likewise.
(poplevel_class): Likewise.
(free_bindings): Adjust type.
(find_binding): Adjust return type, add a third parameter. Remove
non-useful assertion now that we use static typing.
(cxx_scope_find_binding_for_name): New function.
(binding_for_name): Use it. Adjust local variable type. Simplify.
(namespace_binding): Simplify.
(set_namespace_binding): Likewise.
(set_identifier_type_value_with_scope): Adjust local variable type.
(lookup_tag): Don't type-abuse of local variable 'old'.
(lookup_namespace_name): Likewise. Allocate binding on stack.
(select_decl): Adjust prototype.
(unqualified_namespace_lookup): Allocate binding on stack.
Don't type-abuse of local variable 'val'.
(lookup_name_real): Likewise.
(maybe_inject_for_scope_var): Adjust local variable type.
(cp_tree_node_structure): Remove CPLUS_BINDING case label.
(namespace_binding): Adjust logic, simplify.
(BINDING_LEVEL): Adjust definition.
(push_class_level_binding): Adjust local variable type.
(struct cxx_saved_binding): Adjust field 'binding' type.
* decl2.c (ambiguous_decl): Adjust prototype.
(lookup_using_namespace): Adjust local variable type.
(qualified_lookup_using_namespace): Catch type error and correct
ensueing logic error.
(do_nonmember_using_decl): Adjust local variable type. Allocate
temporary cxx_binding on stack.
(do_toplevel_using_decl): Adjust local variable type.
* ptree.c (cxx_print_cxx_binding): New function.
(cxx_print_identifier): Use it.
(cxx_print_xnode): Delete CPLUS_BINDING case label.
From-SVN: r64405
|
|
2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
* cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
cp/lang-options.h, cp/lang-specs.h, cp/lex.h,
cp/ptree.c, cp/repo.c,
java/jcf-reader.c, java/jvgenmain.c,
java/keyword.gperf, java/lang-options.h,
java/mangle.c, java/mangle_name.c,
java/xref.c, java/zextract.c,java/zipfile.h,
objc/Make-lang.in, objc/config-lang.in,
objc/lang-specs.h, objc/objc-act.h: Fix
Copyright years.
From-SVN: r60783
|
|
* call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
copyright header.
* lex.h: parse.y is dead, so don't mention it. Also replace the
copyright header with the default GNU copyright header.
From-SVN: r60738
|
|
* decl2.c (grok_method_quals, warn_if_unknown_interface,
grok_x_components, cp_build_parm_decl, build_artificial_parm,
maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
delete_sanity, check_member_template, check_java_method,
check_classfn, finish_static_data_member_decl, grokfield,
grokbitfield, grokoptypename, grok_function_init,
cplus_decl_attributes, constructor_name, defer_fn,
build_anon_union_vars, finish_anon_union, coerce_new_type,
coerce_delete_type, comdat_linkage, maybe_make_one_only,
key_method, import_export_vtable, import_export_class,
output_vtable_inherit, import_export_decl, import_export_tinfo,
build_cleanup, get_guard, get_guard_bits, get_guard_cond,
set_guard, start_objects, finish_objects,
start_static_storage_duration_function,
finish_static_storage_duration_function, get_priority_info,
start_static_initialization_or_destruction,
finish_static_initialization_or_destruction,
do_static_initialization, do_static_destruction,
prune_vars_needing_no_initialization, write_out_vars,
reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
add_using_namespace, merge_functions, ambiguous_decl,
lookup_using_namespace, lookup_using_namespace,
qualified_lookup_using_namespace, set_decl_namespace,
decl_namespace, current_decl_namespace, push_decl_namespace,
pop_decl_namespace, push_scope, pop_scope, add_function,
arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
lookup_arg_dependent, do_namespace_alias,
validate_nonmember_using_decl, do_nonmember_using_decl,
do_toplevel_using_decl, do_local_using_decl,
do_class_using_decl, do_using_directive, check_default_args,
mark_used, handle_class_head): Use C90 prototypings. Use booleans.
* parser.c (cp_parser_class_head): Use booleanss.
* decl.c (walk_globals, walk_vtables): Likewise.
* cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
walk_globals): Change return type from 'int' to 'bool'.
* rtti.c (init_rtti_processing, build_headof, throw_bad_cast
throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
qualifier_flags, tinfo_base_init, generic_initializer,
ptr_initializer, dfs_class_hint_mark, ptm_initializer,
dfs_class_hint_unmark, class_hint_flags, class_initializer,
typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
* repo.c (repo_compile_flags, repo_template_declared,
repo_template_defined, repo_class_defined, repo_get_id,
repo_template_used, repo_vtable_used, repo_inline_used,
repo_tinfo_used, repo_template_instantiated, extract_string,
open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
finish_repo): Likewise.
* ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
cxx_print_xnode): Likewise..
* cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
cxx_warn_unused_global_decl, cp_expr_size): Likewise.
* cxxfilt.c (demangle_it, print_demangler_list, usage,
standard_symbol_characters, hp_symbol_characters, main, fatal):
Likewise.
(strip_underscore): Change type from 'int' to 'bool'.
(main): Use boolean constants.
From-SVN: r60601
|
|
From-SVN: r60174
|
|
* Makefile.in: Update.
* c-decl.c (print_lang_decl, print_lang_type): Remove.
(print_lang_identifier): Rename c_print_identifier.
* c-lang.c (LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): New.
(print_lang_statistics, lang_print_xnode): Remove.
* c-parse.in (set_yydebug): Rename c_set_yydebug.
* c-tree.h (c_set_yydebug, c_print_identifier): New.
* langhooks-def.h (lhd_print_tree_nothing, lhd_set_yydebug): New.
LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): New.
(LANG_HOOKS_INITIALIZER): Update.
* langhooks.h (struct lang_hooks): New members.
(lang_print_tree_hook): New.
* langhooks.c (lhd_print_tree_nothing, lhd_set_yydebug): New.
* print-tree.c: Include langhooks.h.
(print_node): Update.
* toplev.c (decode_d_option): Update.
* tree.c: Include langhooks.h.
(dump_tree_statistics): Update.
* tree.h (print_lang_statistics, print_lang_decl, print_lang_type,
print_lang_identifier, set_yydebug, lang_print_xnode): Remove.
ada:
* misc.c (gnat_print_decl, gnat_print_type): Renamed.
(LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE): Override.
(print_lang_statistics, lang_print_xnode, print_lang_identifier,
set_yydebug): Remove.
cp:
* cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
* cp-tree.h (print_class_statistics): Remove.
(cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
cxx_print_identifier, cxx_set_yydebug): New.
* lex.c (set_yydebug): Rename c_set_yydebug.
* ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
lang_print_xnode): Rename.
* tree.c (print_lang_statistics): Rename.
f:
* com.c (ffe_print_identifier): Rename.
(LANG_HOOKS_PRINT_IDENTIFIER): Override.
(lang_print_xnode, print_lang_decl, print_lang_statistics,
print_lang_type, set_yydebug): Remove.
java:
* java-tree.h (java_set_yydebug): New.
* jcf-parse.c (set_yydebug): Rename java_set_yydebug.
* lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
(print_lang_decl, print_lang_type, print_lang_identifier,
print_lang_statistics, lang_print_xnode): Remove.
objc:
* objc-act.c (LANG_HOOKS_PRINT_IDENTIFIER,
LANG_HOOKS_SET_YYDEBUG): Override.
(lang_print_xnode, print_lang_statistics): Remove.
From-SVN: r46907
|
|
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
|
|
* cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
(TEMPLATE_TEMPLATE_PARM): Adjust comment.
* cp-tree.h (TYPE_BINFO): Adjust comment.
(TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
(TEMPLATE_TYPE_PARM_INDEX): Likewise.
(IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
(TYPE_TEMPLATE_INFO): Likewise.
(TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
* class.c (push_nested_class): Likewise.
* decl.c (lookup_name_real): Likewise.
(grokdeclarator): Likewise.
(grok_op_properties): Likewise.
(xref_tag): Likewise.
(xref_basetypes): Likewise.
* decl2.c (constructor_name_full): Likewise.
(arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
(arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
* error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
(dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
(dump_type_suffix): Likewise.
* init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
instead.
(get_aggr_from_typedef): Likewise.
* mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
(write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
(write_template_parm): Likewise.
(write_template_template_parm): Check tree code instead of
using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
* method.c (build_overload_nested_name): Add
BOUND_TEMPLATE_TEMPLATE_PARM.
(process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
* parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
* pt.c (convert_template_argument): Check tree code instead of
using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
(for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
(for_each_template_parm): Adjust comment.
(tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
(tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
(unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
template_args_equal to compare template template parameter cases.
* ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
* search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
instead.
* tree.c (copy_template_template_parm): Decide whether to create
a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
(walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
(copy_tree_r): Likewise.
* typeck.c (comptypes): Likewise. Check tree code instead of
using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
From-SVN: r36149
|
|
to tinfo_fn_p.
* cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
and bitfield to tinfo_fn_p.
(DECL_TINFO_FN_P): Adjust.
(SET_DECL_TINFO_FN_P): Likewise.
(DECL_MUTABLE_P): Likewise.
(DECL_C_BIT_FIELD): Likewise.
(SET_DECL_C_BIT_FIELD): Likewise.
(CLEAR_DECL_C_BIT_FIELD): Likewise.
(DECL_UNINLINABLE): Likewise.
* class.c (alter_access): Call retrofit_lang_decl if ncessary.
(handle_using_decl): Remove assertion.
(build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
to build FIELD_DECLs.
(build_base_field): Likewise.
(layout_class_type): Likewise.
* decl.c (init_decl_processing): Likewise.
(build_ptrmemfunc_type): Likewise.
(grokdeclarator): Likewise.
* decl2.c (grok_x_components): Likewise.
* except.c (call_eh_info): Likewise.
* init.c (init_init_processing): Likewise.
* rtti.c (expand_class_desc): Likewise.
(create_pseudo_type_info): Likewise.
(get_vmi_pseudo_type_info): Likewise.
(create_tinfo_types): Likewise.
* ptree.c (print_lang_decl): Adjust.
* typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
before checking DECL_MUTABLE_P.
From-SVN: r34125
|
|
* cp-tree.h (struct lang_decl): Remove main_decl_variant.
(DECL_MAIN_VARIANT): Remove.
* decl.c (duplicate_decls): Don't set it.
(start_function): Likewise.
(lang_mark_tree): Don't mark it.
* decl2.c (defer_fn): Don't use it.
* lex.c (retrofit_lang_decl): Don't set it.
* pt.c (tsubst_decl): Likewise.
* ptree.c (print_lang_decl): Don't print it.
* typeck.c (mark_addressable): Don't use it.
From-SVN: r33048
|
|
From-SVN: r32302
|
|
From-SVN: r32185
|
|
* cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
(RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
(DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
* cp-tree.h: Add tree checking macros to various tree access
macros.
* ptree.c (print_lang_decl): Test for function or variable
before accessing template info.
From-SVN: r29642
|
|
* ptree.c (print_lang_type): Print the real type of a PMF.
Print what exceptions a fn type throws.
* typeck.c (common_type): Use same_type_p.
And revert:
* decl.c (bad_specifiers): It's OK to have an EH spec on a function
pointer.
From-SVN: r28609
|
|
(used in TYPE_DECLs).
* cp-tree.h (struct lang_decl): Added field for storing sorted
FIELD_DECLs (used in TYPE_DECLs).
(DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
(DECL_SORTED_FIELDS): New macro.
* class.c (method_name_cmp): New function.
(finish_struct_methods): Modified to support sorting and searching
methods.
(finish_struct_anon): Changed code in inner loop to use ELT rather
than UELT (which required an extra indirection for every reference).
(field_decl_cmp): New function to support sorting FIELD_DECLs.
(finish_struct_1): Sort fields.
* search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
(lookup_fnfields_1): Search sorted methods in METHOD_VEC.
Also, switch to using array indexing rather than a changing pointer.
* ptree.c (print_lang_decl): Handle TYPE_DECLs that have
DECL_SORTED_FIELDS.
Co-Authored-By: Jason Merrill <jason@yorick.cygnus.com>
From-SVN: r28046
|
|
pedwarn.
* pt.c (do_decl_instantiation): Downgrade duplicate instantiation
errors to pedwarn.
* typeck.c (comptypes): Simplify C code in look_hard.
* xref.c (PALLOC): Use xcalloc, not calloc.
(SALLOC): Use xmalloc, not malloc.
* rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
* search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
is NO_DEBUG.
* decl.c (duplicate_decls): If a redeclaration doesn't match the
initial declaration, then don't save the inline info and by all
means don't mark the function as a builtin function.
* decl.c (lookup_name_real): Set NONCLASS to 1 if
CURRENT_CLASS_TYPE is 0.
* class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
NULL_TREE.
From-SVN: r28044
|
|
* call.c (find_scoped_type, resolve_scope_to_name): Lose.
* class.c (finish_struct_1): Use CLASS_TYPE_P.
* ptree.c (print_lang_type): Likewise.
* typeck.c (build_modify_expr, c_expand_asm_operands): Use
IS_AGGR_TYPE_CODE.
* typeck2.c (digest_init): Likewise.
From-SVN: r27001
|
|
* cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
CLASSTYPE_BINFO_AS_LIST): Remove cruft.
* class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
tree.c: Adjust.
From-SVN: r26071
|
|
* cp-tree.h (lang_type): Remove has_assignment and
has_real_assignment. Add befriending_classes.
(TYPE_HAS_ASSIGNMENT): Remove.
(TYPE_HAS_REAL_ASSIGNMENT): Likewise.
(CLASSTYPE_BEFRIENDING_CLASSES): New macro.
(lang_decl): Document.
(DECL_BEFRIENDING_CLASSES): New macro.
(FRIEND_NAME): Move declaration to more obvious location.
(FRIEND_DECLS): Likewise.
* class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
* decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
(fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
(grok_op_properties): Likewise.
* friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
(add_friend): Likewise. Don't do weird things with assignment
operators. Update DECL_BEFRIENDING_CLASSES.
(add_friends): Don't do weird things with assignment operators.
(make_friend_class): Likewise. Update
CLASSTYPE_BEFRIENDING_CLASSES.
* pt.c (instantiate_class_template): Don't set
TYPE_HAS_ASSIGNMENT.
(tsubst_copy): Substitute the TREE_TYPE for more unary
expressions.
* ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
* search.c (protected_accessible_p): New function.
(friend_accessible_p): Likewise.
(accessible_p): Use them.
From-SVN: r25940
|
|
* 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
|
|
From-SVN: r23764
|