Age | Commit message (Collapse) | Author | Files | Lines |
|
* tree.c (get_fns): Split out from get_first_fn.
* cp-tree.h: Declare it.
* search.c (shared_member_p): Use it.
* semantics.c (finish_qualified_id_expr): Simplify.
(finish_id_expression): Simplify.
From-SVN: r158810
|
|
2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
* Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
* cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
translation.
* parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
(cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
(cp_parser_parameter_declaration)
(cp_parser_exception_specification_opt)
(cp_parser_exception_declaration): Likewise.
* pt.c (check_default_tmpl_args): Likewise.
* search.c (lookup_field_r): Likewise.
From-SVN: r156645
|
|
Fix PR c++/42260
gcc/cp/ChangeLog:
PR c++/42260
* cp-tree.h (lookup_conversions): Add new bool parameter to
declaration.
* search.c (lookup_conversion): Use new bool parameter in
definition.
* call.c (add_builtin_candidates): Don't lookup template conversion
(convert_class_to_reference, build_user_type_conversion_1,
build_op_call): Adjust.
* cvt.c (build_expr_type_conversion): Likewise
gcc/testsuite/ChangeLog:
PR c++/42260
* conversion/cast2.C: New test.
From-SVN: r155415
|
|
PR c++/13950, DR 176
* search.c (lookup_field_r): Allow lookup to find the
injected-class-name from a template base.
(template_self_reference_p): Remove.
* decl.c (make_typename_type): Diagnose ambiguity. Use
maybe_get_template_decl_from_type_decl.
* parser.c (cp_parser_template_name): Pass true to is_template
rather than use maybe_get_template_decl_from_type_decl.
(cp_parser_lookup_name): Use maybe_get_template_decl_from_type_decl.
* pt.c (maybe_get_template_decl_from_type_decl): Handle ambiguity.
Use DECL_SELF_REFERENCE_P.
* parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
Avoid duplicate ambiguity error.
* error.c (dump_decl): Don't say "typedef" for injected-class-name.
* pt.c (convert_template_argument): Tweak logic.
From-SVN: r154223
|
|
From-SVN: r153922
|
|
PR c++/39413
* search.c (lookup_base): Don't complete_type (base).
From-SVN: r153920
|
|
From-SVN: r152318
|
|
* 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
|
|
From-SVN: r144324
|
|
PR c++/38579
* search.c (protected_accessible_p): N doesn't vary.
From-SVN: r143439
|
|
Implement defaulted/deleted functions as per N2346
* cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
(DECL_DELETED_FN): New macro.
(DECL_DEFAULTED_FN): New macro.
* class.c (user_provided_p): New fn.
(defaultable_fn_p): New fn.
(type_has_user_provided_constructor): New fn.
(type_has_user_provided_default_constructor): New fn.
(check_methods): A defaulted fn is still trivial.
(check_bases_and_members): Likewise.
* decl.c (grok_special_member_properties): Likewise.
(duplicate_decls): Complain about redeclaring a function as deleted.
(start_decl): initialized==2 means deleted.
(cp_finish_decl): Handle deleted/defaulted semantics.
* decl2.c (grokfield): Likewise.
(mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
Complain about using a deleted fn.
* init.c (build_value_init_1): Use type_has_user_provided_constructor.
(perform_member_init): Check for a user-provided default constructor
even if TYPE_NEEDS_CONSTRUCTING.
(build_new_1): Likewise.
* call.c (build_over_call): Don't call mark_used twice.
* method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
* search.c (check_final_overrider): Check for deleted mismatch.
* parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
(cp_parser_pure_specifier): Handle =default and =delete.
* error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
From-SVN: r138123
|
|
2008-03-21 Paolo Carlini <pcarlini@suse.de>
* cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
(SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
(IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
(PROMOTES_TO_AGGR_TYPE): Remove.
(CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
* typeck.c (unary_complex_lvalue, build_modify_expr,
convert_for_initialization): Adjust.
* init.c (is_aggr_type): Remove.
(is_class_type): Add.
(build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
build_delete): Adjust.
* lex.c (make_aggr_type): Remove.
(make_class_type): Add.
(cxx_make_type): Adjust.
* class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
Adjust.
* decl.c (build_typename_type, make_typename_type,
make_unbound_class_template, cxx_init_decl_processing,
check_tag_decl, groktypename, start_decl_1, layout_var_decl,
check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
grok_op_properties, xref_tag, check_function_type): Adjust.
* call.c (check_dtor_name, standard_conversion, implicit_conversion,
add_builtin_candidate, add_builtin_candidates,
build_user_type_conversion_1, convert_like_real, build_cxx_call,
is_subseq, compare_ics): Adjust.
* method.c (use_thunk): Adjust.
* rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
create_tinfo_types): Adjust.
* cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
build_up_reference, convert_to_reference, convert_from_reference,
ocp_convert, build_expr_type_conversion): Adjust.
* tree.c (bind_template_template_parm, error_type): Adjust.
* dump.c (cp_dump_tree): Adjust.
* search.c (lookup_member): Adjust.
* friend.c (make_friend_class, do_friend): Adjust.
* typeck2.c (store_init_value, process_init_constructor_array,
process_init_constructor_record, build_x_arrow, build_m_component_ref,
build_functional_cast): Adjust.
* pt.c (finish_member_template_decl, process_template_parm,
lookup_template_class, tsubst_function_type, tsubst,
tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
Adjust.
* semantics.c (begin_class_definition, finish_base_specifier,
finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
Adjust.
* name-lookup.c (constructor_name_p, push_overloaded_decl,
do_class_using_decl, lookup_qualified_name,
maybe_process_template_type_declaration): Adjust.
* decl2.c (grok_array_decl, check_member_template,
constrain_class_visibility): Adjust.
* parser.c (cp_parser_class_name): Adjust.
From-SVN: r133434
|
|
accepted without error)
PR c++/14688
* config/i386/i386.c (ix86_comp_type_attributes): Check
METHOD_TYPE too.
cp
* search.c (check_final_overrider): Fail if
targetm.comp_type_attributes returns 0.
testsuite
* g++.dg/inherit/override_attribs.C: New file.
From-SVN: r128740
|
|
/cp
2007-08-31 Paolo Carlini <pcarlini@suse.de>
PR c++/32113
* search.c (lookup_member): Check the name argument for
error_mark_node.
/testsuite
2007-08-31 Paolo Carlini <pcarlini@suse.de>
PR c++/32113
* g++.dg/template/crash70.C: New.
From-SVN: r127963
|
|
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
|
|
PR c++/29475
* cp-tree.h (enforce_access, perform_or_defer_access_check): Added an
extra argument that represents the declaration to use to print
potential error messages.
* init.c (build_offset_ref): Adjusted the call to
perform_or_defer_access_check.
* class.c (alter_access, resolve_address_of_overloaded_function):
Likewise.
* decl.c (make_typename_type, make_unbound_class_template): Likewise.
* search.c (lookup_member): Likewise.
* friend.c (add_friend): Likewise.
* parser.c (cp_parser_template_id,
cp_parser_pre_parsed_nested_name_specifier): Likewise.
* semantics.c (finish_non_static_data_member,
check_accessibility_of_qualified_id, finish_id_expression): Likewise.
(pop_to_parent_deferring_access_checks, perform_access_checks,
perform_or_defer_access_check): Adjusted the call to enforce_access.
* call.c (enforce_access): Use the new extra argument to build the
error message.
(build_op_delete_call): Adjusted the call to
perform_or_defer_access_check.
(build_over_call): Likewise.
PR c++/29475
* g++.dg/template/access19.C: New test.
* g++.old-deja/g++.other/access11.C: Adjusted the line where the
error is reported.
From-SVN: r119027
|
|
PR c++/28588
* class.c (resolve_address_of_overloaded_function): Add
access_path parameter. Perform access checks.
(instantiate_type): Adjust call to
resolve_address_of_overloaded_function. Remove unnecessary code.
* tree.c (is_overloaded_fn): Document. Return 2 when there are
acutally multiple functions.
(really_overloaded_fn): Use is_overloaded_fn.
* mangle.c (write_expression): Handle BASELINKs.
* cp-tree.h (really_overloaded_fn): Return bool.
(baselink_for_fns): Declare.
* search.c (lookup_member): Check access for single static
functions here.
* pt.c (convert_nontype_argument_function): Handle BASELINKs.
(tsubst_copy_and_build): Generate BASELINKs for template-ids.
* semantics.c (finish_call_expr): Use baselink_for_fns.
(baselink_for_fns): New function.
(finish_id_expression): Use it.
* parser.c (cp_parser_template_argument): Don't strip BASELINKs.
PR c++/28595
* pt.c (tsubst): Issue errors about attempts to create VLAs at
template-instantiation time.
PR c++/28588
* g++.dg/inherit/access6.C: New test.
* g++.dg/inherit/access7.C: Likewise.
PR c++/28595
* g++.dg/template/array15.C: New test.
* g++.dg/template/crash2.C: Tweak error markers.
From-SVN: r116468
|
|
PR c++/28432
* decl2.c (check_classfn): Remove early return.
* search.c (lookup_member): Return NULL with bad type.
* g++.dg/other/pr28304.C: Change expected error message.
* g++.dg/other/pr28432.C: New test.
From-SVN: r115857
|
|
PR c++/27495
* search.c (adjust_result_of_qualified_name_lookup): Change
assert to part of if statement.
From-SVN: r115557
|
|
PR c++/18681
* friend.c (is_friend): Fix DR 45 implementation.
From-SVN: r115208
|
|
From-SVN: r115119
|
|
PR c++/28215
* method.c (make_thunk): Unset DECL_USE_TEMPLATE and
DECL_TEMPLATE_INFO.
From-SVN: r115118
|
|
From-SVN: r114428
|
|
PR c++/27581
* search.c (adjust_result_of_qualified_name_lookup): Skip on
invalid context_class.
* g++.dg/lookup/this1.C: New test.
From-SVN: r113781
|
|
gcc/
2006-03-24 Carlos O'Donell <carlos@codesourcery.com>
* doc/invoke.texi: Document -femit-class-debug-always
* common.opt: Add -femit-class-debug-always.
gcc/cp/
2006-03-24 Carlos O'Donell <carlos@codesourcery.com>
* search.c (maybe_suppress_debug_info): If
flag_emit_class_debug_always then don't suppress.
From-SVN: r112360
|
|
* call.c (alloc_conversion): Use cast when converting from
void *.
(alloc_conversions): Likewise.
(add_candidate): Likewise.
(print_z_candidates): Likewise.
(add_warning): Likewise.
* pt.c (retrieve_local_specialization): Likewise.
(process_partial_specialization): Likewise.
(mangle_class_name_for_template): Likewise.
(tsubst_template_args): Likewise.
* typeck2.c (pat_calc_hash): Likewise.
(pat_compare): Likewise.
(abstract_virtuals_error): Likewise.
* class.c (method_name_cmp): Likewise.
(resort_method_name_cmp): Likewise.
(get_vfield_name): Likewise.
* decl2.c (generate_ctor_and_dtor_functions_for_priority):
Likewise.
* lex.c (init_reswords): Likewise.
* rtti.c (create_pseudo_type_info): Likewise.
* search.c (dfs_lookup_base): Likewise.
(dfs_dcast_hint_pre): Likewise.
(dfs_dcast_hint_post): Likewise.
* tree.c (hash_tree_cons): Likewise.
* repo.c (extract_string): Likewise.
(afgets): Likewise.
* cp-objcp-common.c (decl_shadowed_for_var_lookup): Likewise.
* g++spec.c (lang_specific_driver): Likewise.
From-SVN: r110366
|
|
* search.c (lookup_conversions_r): Fix a pasto.
* g++.dg/parse/lookup5.C: New test.
From-SVN: r109877
|
|
PR c++/22618
* search.c (accessible_p): Check access in the outermost set of
template parameters.
PR c++/22618
* g++.dg/parse/access8.C: New test.
From-SVN: r105682
|
|
2005-07-02 Zack Weinberg <zack@codesourcery.com>
Joseph S. Myers <joseph@codesourcery.com>
* toplev.c (default_tree_printer): Handle setting location with
'+' flag.
* c-objc.common.c (c_tree_printer): Likewise.
* c-format.c (gcc_diag_flag_specs): Add '+'.
(gcc_cdiag_char_table): Allow '+' flag for tree formats.
(format_types_orig): Allow '+' flag for gcc_diag and gcc_cdiag
formats.
* c-common.c, c-decl.c, c-objc-common.c, c-pragma.c,
config/arm/pe.c, config/i386/winnt.c, config/ia64/ia64.c,
config/mcore/mcore.c, config/sh/symbian.c, config/sol2.c,
config/v850/v850.c, function.c, stor-layout.c, toplev.c,
tree-inline.c, tree-optimize.c, tree.c, varasm.c: Use '+' flag
instead of %J or %H. Use 'q' flag for quoting. Avoid '.' at end
of diagnostics. Use %q+D not %s for a decl. Do not pass excess
format arguments where %J is used without %D.
cp:
* error.c (location_of): Add comment.
(locate_error, cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
* cp-tree.h (cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
* call.c, class.c, decl.c, decl2.c, friend.c, init.c,
name-lookup.c, parser.c, pt.c, search.c, semantics.c, typeck.c,
typeck2.c: Use '+' flag instead of %J, cp_error_at, cp_warning_at
or cp_pedwarn_at. Mark up some diagnostic strings with N_.
java:
* class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q'
flag for quoting.
objc:
* objc-act.c: Use '+' flag instead of %J. Use 'q' flag for
quoting.
testsuite:
* gcc.dg/format/gcc_diag-1.c: Update.
From-SVN: r101532
|
|
From-SVN: r101312
|
|
From-SVN: r100965
|
|
From-SVN: r100952
|
|
cp:
PR c++/19497
* cp-tree.def (USING_DECL): Update documentation.
* cp-tree.h (DECL_DEPENDENT_P): New.
(USING_DECL_DECLS, USING_DECL_SCOPE): New.
* class.c (handle_using_decl): Move most of the processing to ...
* name-lookup.c (do_class_using_decl): ... here. Make stricter.
(push_using_decl): Use USING_DECL_SCOPE.
(cp_emit_debug_info_for_using): Make extern.
* cxx-pretty-print.c (pp_cxx_statement) <USING_DECL case>: Adjust.
* name-lookup.h (cp_emit_debug_info_for_using): Declare.
* pt.c (tsubst_decl) <USING_DECL case>: Use do_class_using_decl
when tsubsting.
(tsubst_expr): Use USING_DECL_SCOPE.
* search.c (lookup_field_1): Use DECL_DEPENDENT_P.
* semantics.c (finish_member_declaration): Likewise.
testsuite:
PR c++/19497
* g++.dg/inherit/using5.C: New.
* g++.dg/inherit/using6.C: New.
From-SVN: r100757
|
|
* vec.h: Update API to separate allocation mechanism from type.
(VEC_safe_grow): New.
* vec.c (calculate_allocation): New.
(vec_gc_o_reserve, vec_heap_o_reserve): Adjust.
(vec_gc_free, vec_heap_free): Remove.
* gengtype-lex.l (DEF_VEC_): Process mult-argument macros. Adjust.
(VEC): Likewise.
(mangle_macro_name): New.
(struct macro_def): New.
(struct macro): Add multiple argument values.
(macro_expans_end): New.
(push_macro_expansion): Chain on new macro. Process multiple
args, create follow on expansion. Return follow on argument.
(macro_input): Deal with multiple arguments.
* tree.h: Define VEC(tree,heap) and VEC(tree,gc).
(struct tree_binfo): Adjust.
* basic-block.h: Define VEC(edge,gc).
(struct edge_def): Adjust.
(struct basic_block_def, struct edge_iterator): Likewise.
(ei_container, ei_start_1, ei_last_1): Likewise.
* cfg.c (connect_src, connect_dest): Likewise.
* cfgrtl.c (force_nonfallthru_and_redirect)
* dbxout.c (dbxout_type)
* dwarf2out.c (gen_member_die)
* lambda-code.c: Define VEC(int,gc), VEC(lambda_loop,gc).
(gcc_tree_to_linear_expression): Adjust.
(gcc_loop_to_lambda_loop, gcc_loopnest_to_lambda_loopnest,
lbv_to_gcc_expression, lle_to_gcc_expression,
lambda_loopnest_to_gcc_loopnest, can_convert_to_perfect_nest,
perfect_nestify): Likewise.
* lambda.h (gcc_loopnest_to_lambda_loopnest,
lambda_loopnest_to_gcc_loopnest): Adjust prototypes.
* profile.c (instrument_values): Adjust.
* tree-cfg.c (modified_noreturn_calls): Adjust.
(remove_fallthru_edge): Likewise.
* tree-dump.c (dequeue_and_dump): Adjust.
* tree-flow-inline.h (mark_stmt_modified): Adjust.
* tree-flow.h (modified_noreturn_calls): Adjust.
(tree_on_heap): Remove. (yay!)
(register_new_def): Adjust.
* tree-into-ssa.c: Define VEC(int,heap).
(block_defs_stack): Adjust.
(find_idf, insert_phi_nodes, register_new_def,
rewrite_initialize_block, rewrite_finalize_block,
register_new_update_single, rewrite_update_init_block,
rewrite_update_fini_block, rewrite_blocks,
ssa_rewrite_finalize_block, ssa_register_new_def,
ssa_rewrite_initialize_block, rewrite_ssa_into_ssa): Likewise.
* tree-loop-linear.c (linear_transform_loops): Adjust.
* tree-ssa-alias.c: Define VEC(fieldoff_t,heap).
(push_fields_onto_fieldstack, create_overlap_variables_for): Adjust.
* tree-ssa-dom.c (avail_exprs_stack, block_defs_stack,
stmts_to_rescan, const_and_copies_stack, nonzero_vars_stack,
vrp_variables_stack): Adjust declarations.
(tree_ssa_dominator_optimize): Adjust.
(dom_opt_initialize_block, remove_local_expressions_from_table,
restore_nonzero_vars_to_original_value,
restore_vars_to_original_value,
restore_currdefs_to_original_value, dom_opt_finalize_block,
record_var_is_nonzero, record_cond, record_const_or_copy_1,
optimize_stmt, update_rhs_and_lookup_avail_expr,
lookup_avail_expr, record_range): Likewise.
* tree-ssa-pre.c: Define VEC(basic_block,heap).
(compute_antic_aux): Adjust.
(inserted_exprs, create_expression_by_pieces,
insert_into_preds_of_block, eliminate, mark_operand_necessary,
remove_dead_inserted_code, fini_pre): Likewise.
* tree-ssa-propagate.c (interesting_ssa_edges): Adjust.
(varying_ssa_edges, add_ssa_edge, process_ssa_edge_worklist.
ssa_prop_init): Likewise.
* tree-ssa.c: Define VEC(bitmap,heap).
(verify_name_tags): Adjust.
* value-prof.c (rtl_divmod_values_to_profile): Adjust.
(insn_prefetch_values_to_profile, rtl_find_values_to_profile,
tree_divmod_values_to_profile, tree_find_values_to_profile,
value_profile_transformations): Likewise.
* value-prof.h: Define VEC(histogram_value,heap).
* varasm.c: Remove alias_pair pointer typedef, define
VEC(alias_pair,gc).
(finish_aliases_1, finish_aliases_2, assemble_alias): Adjust.
* config/pa/pa.c (typedef extern_symbol): Typedef the structure,
not a pointer to it. Create an object vector.
(extern_symbols): Turn into an object vector.
(pa_hpux_asm_output_external, pa_hpux_file_end): Adjust.
* cp/cp-tree.h: Adjust for new VEC API.
Define VEC(tree_pair_s,gc).
(struct save_scope): Adjust.
(struct lang_type_class): Adjust.
(unemitted_tinfo_decls): Adjust.
* cp/class.c (add_method, resort_type_method_vec,
finish_struct_methods, struct find_final_overrider_data,
dfs_find_final_overrider_pre, find_final_overrider,
get_vcall_index, warn_hidden, walk_subobject_offsets,
check_methods, fixup_inline_methods, end_of_class,
warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
add_vcall_offset): Adjust.
* cp/decl.c (xref_basetypes, finish_method): Adjust.
* cp/decl2.c (check_classfn): Adjust.
* cp/init.c (sort_mem_initializers, push_base_cleanups): Adjust.
* cp/method.c (do_build_copy_constructor): Adjust.
* cp/name-lookup.c (new_class_binding, store_binding,
store_bindings, store_class_bindings): Adjust.
* cp/name-lookup.h: Define VEC(cxx_saved_binding,gc),
VEC(cp_class_binding,gc).
(struct cp_binding_level): Adjust.
* cp/parser.c: Define VEC(cp_token_position,heap).
(struct cp_lexer): Adjust.
(cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
cp_lexer_save_tokens): Adjust.
* cp/pt.c (retrieve_specialization,
check_explicit_specialization): Adjust.
* cp/rtti.c (unemitted_tinfo_decls): Adjust.
(init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
get_pseudo_ti_desc): Adjust.
* cp/search.c (dfs_access_in_type, lookup_conversion_operator,
lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
* cp/semantics.c: Define VEC(deferred_access,gc).
(push_deferring_access_checks): Adjust.
* cp/typeck2.c (abstract_virtuals_error): Adjust.
From-SVN: r98498
|
|
cp:
PR c++/19891
* class.c (build_simple_base_path): Build the component_ref
directly.
(update_vtable_entry_for_fn): Walk the covariant's binfo chain
rather than using lookup_base.
* search.c (dfs_walk_once): Add non-recursive assert check.
* typeck.c (build_class_member_access_expr): It is possible for
the member type to be both const and volatile.
testsuite:
PR c++/19891
* g++.dg/abi/covariant4.C: New.
From-SVN: r95005
|
|
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
|
|
specialization of template class)
PR c++/17154
* search.c (lookup_field_1): Handle using declaration in
class template partial specialization.
* g++.dg/template/using9.C: New test.
From-SVN: r92994
|
|
* cp-tree.h (context_as_string): Remove extern.
* error.c (context_as_string): Remove.
* cp-tree.h (cp_type_qual_from_rid): Remove extern.
* lex.c (cp_type_qual_from_rid): Remove.
* cp-tree.h (do_poplevel): Remove extern.
(check_multiple_declarators): Likewise.
* semantics.c (do_poplevel): Make static.
(check_multiple_declarators): Remove.
* cp-tree.h (check_final_overrider): Remove extern.
* search.c (check_final_overrider): Make static.
* cp-tree.h (build_artificial_parm): Remove extern.
* decl2.c (build_artificial_parm): Make static.
From-SVN: r91134
|
|
* stack.h: Remove.
cp/
* Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
* search.c: Don't include it.
From-SVN: r90724
|
|
appropriate.
* builtins.c, c-common.c, c-decl.c, c-format.c, c-format.h,
c-parse.in, c-pch.c, c-pragma.c, collect2.c, final.c, gcc.c,
gcov.c, opts.c, pretty-print.h, protoize.c, reg-stack.c, rtl.c,
tlink.c, config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c,
config/avr/avr.c, config/c4x/c4x.c, config/darwin.c,
config/frv/frv.c, config/h8300/h8300.c, config/i386/i386.c,
config/i386/winnt.c, config/ia64/ia64.c, config/ip2k/ip2k.c,
config/iq2000/iq2000.c, config/m32r/m32r.c,
config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/m68k/m68k.h,
config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c,
config/ns32k/ns32k.c, config/rs6000/host-darwin.c,
config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c,
config/sh/symbian.c, config/stormy16/stormy16.c,
config/v850/v850.c: Avoid "`" as left quote, using "'" or %q, %<
and %> as appropriate. Use %' as apostrophe in diagnostics where
applicable. Use %< and %> in place of '' quotes where applicable.
Use %qs in place of %<%s%>. Consistently quote __builtin function
names.
ada:
* misc.c (gnat_handle_option): Use %< and %> for quoting in
warning message.
cp:
* call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
quoting in diagnostics.
* parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
quoting in printf format.
* decl.c (duplicate_decls, start_decl): Use %qD instead of
unquoted %D.
objc:
* objc-act.c: Use %q, %< and %> for quoting in diagnostics.
testsuite:
* gcc.dg/builtin-prefetch-1.c: Adjust expected messages.
From-SVN: r90337
|
|
* class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
search.c, typeck2.c: Fix comment formatting.
From-SVN: r90265
|
|
cp:
PR c++/18064
* search.c (check_final_overrider): Deprecate gnu covariant extension.
doc:
PR c++/18064
* doc/extend.texi (Deprecated Features): Deprecate G++ covariant
extension.
testsuite:
PR c++/18064
* g++.old-deja/g++.mike/p811.C: Avoid covariant extension.
From-SVN: r89946
|
|
* name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
* search.c (current_scope): Fix prototype.
From-SVN: r89632
|
|
PR c++/18093
* search.c (current_scope): Return the innermost non-block scope,
not the innermost non-block, non-namespace scope.
(at_namespace_scope_p): Adjust accordingly.
(dfs_accessible_post): Do not pass namespaces to is_friend.
(dfs_walk_once_accessible_r): Likewise.
* decl.c (grokvardecl): Adjust call to current_scope.
(build_enumerator): Likewise.
* parser.c (cp_parser_using_declaration): Likewise.
(cp_parser_direct_declarator): Use at_namespace_scope_p instead of
current_scope.
(cp_parser_class_head): Adjust call to current_scope.
* name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
alias.
PR c++/18020
* pt.c (tusbst_copy_and_build): Resolve enumeration constants to
their underlying values.
PR c++/18161
* typeck.c (build_binary_op): Honor build_type, even when in a
template.
PR c++/18093
* g++.dg/lookup/ns2.C: New test.
PR c++/18020
* g++.dg/template/enum4.C: New test.
PR c++/18161
* g++.dg/template/expr1.C: New test.
From-SVN: r89627
|
|
cp:
* cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
(ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
(PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
(enum base_access): Reorganize.
(accessible_base_p, accessible_p): Add consider_local_p parameter.
* call.c (standard_conversion): Update comment about
DERIVED_FROM_P.
(enforce_access): Adjust accessible_p call.
(build_over_call): Adjust accessible_base_p call.
* class.c (convert_to_base): Adjust lookup_base call.
(build_vtbl_ref_1): Likewise.
(warn_about_ambiguous_bases): Likewise. Add early exit.
* cvt.c (convert_to_pointer_force) Adjust lookup_base call.
* search.c (accessible_base_p): Add consider_local_p parameter.
(lookup_base): Pass consider_local_p to accessible_base_p call.
(friend_accessible_p): Check whether scope is a class member.
Remove unnecessary class template check.
(accessible_p): Add consider_local_p parameter. Use it.
(adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
* tree.c (maybe_dummy_object): Likewise.
* typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
(build_class_member_access_expr): Adjust lookup_base call.
* typeck2.c (binfo_or_else): Likewise.
* rtti.c (build_dynamic_cast_1): Access can consider friendship
and current scope.
testsuite:
* g++.dg/eh/shadow1.C: New.
From-SVN: r89232
|
|
From-SVN: r88981
|
|
* class.c (dfs_modify_vtables): Simplify condition. Return
dfs_skip_bases as appropriate.
(modify_all_vtables): Walk in pre-order.
* search.c (dfs_walk_all, dfs_walk_once_r,
dfs_walk_once_accessible_r): Assert post order function never
returns dfs_skip_bases.
From-SVN: r88939
|
|
* search.c (struct lookup_base_data_s): New.
(lookup_base_r): Replace with ...
(dfs_lookup_base): ... this.
(lookup_base): Use dfs_walk_all.
From-SVN: r88934
|
|
From-SVN: r88927
|
|
* cp-tree.h (get_dynamic_cast_base_type): Rename to ...
(dcast_base_hint): ... here.
* rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
* search.c (struct dcast_data_s): New.
(dynamic_cast_base_recurse): Remove. Replace with ...
(dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
(get_dynamic_cast_base_type): Rename to ...
(dcast_base_hint): ... here. Use dfs_walk_once_accessible.
(accessible_r): Remove.
(dfs_accessible_post): New, broken out of accessible_r.
(accessible_p): Use dfs_walk_once_accessible.
(dfs_walk_once_accessible_r): New. From accessible_r.
(dfs_walk_once_accessible): New. From acessible_p.
From-SVN: r88884
|