Age | Commit message (Collapse) | Author | Files | Lines |
|
of hanging an attribute object off the decl.
* c-common.c (handle_visibility_attribute): Set DECL_VISIBILITY
field instead of hanging an attribute object off the decl.
* tree.h (DECL_VISIBLITY): New accessor macro for
symbol_visibility field in struct tree_decl.
(enum symbol_visibility): Move definition to before tree_decl.
(struct tree_decl): Define new two-bit field, symbol_visibility.
(decl_visibility): Remove declaration.
* varasm.c (maybe_assemble_visibility): Use DECL_VISIBILITY
instead of decl_visibility.
(default_binds_local_p_1): Use DECL_VISIBILITY instead of
decl_visibility.
(decl_visibility): Remove.
* cp/decl.c (duplicate_decls): copy DECL_VISIBILITY field.
* cp/method.c (use_thunk): give thunk same visibility as function.
* cp/optimize.c (maybe_clone_body): copy DECL_VISIBILITY field.
From-SVN: r73320
|
|
cp:
PR c++/12698, c++/12699, c++/12700, c++/12566
* cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New.
(debug_class, debug_thunks): New.
* class.c (dump_class_hierarchy_1): New break out from ...
(dump_class_hierarchy): ... here.
(dump_thunk, debug_thunks, debug_class): New.
(update_vtable_entry_for_fn): Add ssizetype casts. Correct
continued search for primary binfo via virtual.
(build_vtbl_initializer): Follow covariant thunk alias.
* method.c (make_thunk): Clear DECL_THUNKS of the thunk.
(finish_thunk): Look for an alias of the covariant thunk and point
to it.
(use_thunk): We should never use an alias.
* semantics.c (emit_associated_thunks): Do not emit aliases.
PR c++/12566
* cp-tree.h (cp_fname_init): Add TYPE pointer param.
* decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't
create an ad-hoc ERROR_MARK.
(cp_make_fname_decl): Adjust.
* pt.c (tsubst_expr): Adjust.
testsuite:
PR c++/12698, c++/12699, c++/12700, c++/12566
* g++.dg/inherit/covariant9.C: New test.
* g++.dg/inherit/covariant10.C: New test.
* g++.dg/inherit/covariant11.C: New test.
From-SVN: r72882
|
|
From-SVN: r71641
|
|
* tree.h (TREE_LOCUS): Rename from DECL_SOURCE_LOCATION; make const.
(TREE_FILENAME, TREE_LINENO): Likewise.
(set_tree_locus, copy_tree_locus, set_tree_file_line): New.
(TREE_LOCUS_SET_P): New.
* c-aux-info.c, c-decl.c, c-parse.in, coverage.c, dbxout.c,
diagnostic.c, dwarf2out.c, dwarfout.c, function.c, integrate.c,
print-tree.c, stmt.c, toplev.c, tree-dump.c, tree-inline.c,
tree-optimize.c, tree.c, tree.def, xcoffout.c, config/alpha/alpha.c,
config/mips/mips.c, doc/c-tree.texi, objc/objc-act.c: Update to match.
ada/
* trans.c, utils.c: Update for DECL_SOURCE_LOCATION rename and
change to const.
cp/
* class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
DECL_SOURCE_LOCATION rename and change to const.
f/
* com.c, ste.c: Update for DECL_SOURCE_LOCATION rename and
change to const.
java/
* class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
treelang/
* treetree.c: Update for DECL_SOURCE_LOCATION rename and
change to const.
From-SVN: r71636
|
|
PR bootstrap/12168
* method.c (use_thunk): Clear DECL_RTL of copied nodes.
From-SVN: r71234
|
|
From-SVN: r70473
|
|
* decl2.c (maybe_make_one_only): Use mark_referenced.
* method.c (use_thunk): Likewsie.
From-SVN: r69979
|
|
* cp-tree.h (begin_compound_stmt): No scope arg is a bool.
(finish_compound_stmt): Remove no scope arg.
* decl.c (register_dtor_fn): Adjust begin_compound_stmt and
end_compound_stmt calls.
(expand_static_init, begin_destructor_body, begin_function_body,
finish_function_body): Likewise.
* decl2.c (start_objects, finish_objects,
start_static_storage_duration_function,
finish_static_storage_duration_function): Likewise.
* init.c (begin_init_stmts, finish_init_stmts,
construct_virtual_base, build_vec_init): Likewise.
* method.c (do_build_assign_ref, synthesize_method): Likewise.
* parser.c (cp_parser_compound_statement,
cp_parser_implicitly_scoped_statement,
cp_parser_already_scoped_statement): Likewise.
* pt.c (tsubst_expr): Likewise.
* semantics.c (begin_compound_stmt): No scope arg is a bool.
(finish_compound_stmt): Remove no scope arg.
* error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
always dyadic.
From-SVN: r69882
|
|
* cp-tree.h (convert_to_base_statically): Declare.
* call.c (build_special_member_call): Convert INSTANCE to the base
type.
* class.c (convert_to_base_statically): New method.
* init.c (construct_virtual_base): Use it.
* method.c (do_build_assign_ref): Fix typo in comment.
* g++.dg/inherit/access5.C: New test.
From-SVN: r69763
|
|
cp:
* cp-tree.h (hack_identifier): Remove.
* method.c (hack_identifier): Remove.
* semantics.c (finish_id_expression): Expand hack_identifier
here. Simplify.
From-SVN: r69625
|
|
cp:
* cp-tree.h (finish_non_static_data_member): Add object param.
* method.c (hack_identifier): Adjust.
* pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
again for a FIELD_DECL.
* semantics.c (finish_non_static_data_member): Add object
parameter. Always save the DECL in the COMPONENT_REF.
* call.c (resolve_scoped_fn_name): Adjust.
testsuite:
* g++.dg/parse/non-dependent2.C: New test.
From-SVN: r69564
|
|
* cp-tree.h (build_scoped_method_call): Remove.
(lookup_qualified_name): Remove parameter.
(tsubst_copy_and_build): Declare.
(finish_qualified_object_call_expr): Remove.
(check_accessibility_of_qualified_id): New function.
(finish_qualified_id_expr): Likewise.
(non_reference): Likewise.
(build_expr_from-tree): Remove.
* call.c (non_reference): Remove.
(build_scoped_method_call): Likewise.
(build_method_call): Use error_operand_p. Assert that we are not
processing a template.
(standard_conversion): Use non_reference.
* class.c (build_vtbl_entry_ref): Likewise.
(build_vtbl_ref_1): Likewise.
* cvt.c (build_expr_type_conversion): Use non_reference.
* decl.c (lookup_qualified_name): Remove flags parameter.
(grok_op_properties): Use non_reference.
* decl2.c (grok_array_decl): Likewise.
(build_expr_from_tree): Remove.
(build_offset_ref_call_from_tree): Update comment.
* error.c (parm_to_string): Call reinit_global_formatting_buffer.
* except.c (prepare_eh_types): Use non_reference.
(can_convert_eh): Likewise.
* init.c (build_dtor_call): Avoid using build_method_call.
* mangle.c (write_template_param): Remove misleading comment.
* method.c (locate_copy): Use non_reference.
* parser.c (cp_parser_scope_through_which_access_occurs): Remove.
(cp_parser_primary_expression): Do not create SCOPE_REFs is
non-dependent contexts.
(cp_parser_postfix_expression): Use finish_qualified_id_expr.
(cp_parser_direct_declarator): Use tsubst_copy_and_build, not
build_expr_from_tree.
(cp_parser_lookup_name): Adjust call to lookup_qualified_name.
Use check_accessibility_of_qualified_id.
* pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
build_expr_from_tree.
(tsubst_baselink): New function.
(tsubst_qualified_id): Likewise.
(tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
(tsubst_expr): Adjust call to lookup_qualified_name.
(tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
handling of CALL_EXPRs.
(value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
* rtti.c (get_tinfo_decl_dynamic): Use non_reference.
* search.c (check_final_overrider): Likewise.
* semantics.c (check_accessibility_of_qualified_id): New function.
(finish_qualified_object_call_expr): Remove.
* typeck.c (target_type): Use non_reference.
(cxx_sizeof_or_alignof_type): Likewise.
(dubious_conversion_warnings): Likewise.
(convert_for_initialization): Likewise.
(non_reference): New function.
From-SVN: r69063
|
|
* call.c: Fix comment formatting.
* class.c: Likewise.
* cp-tree.h: Likewise.
* decl.c: Likewise.
* decl2.c: Likewise.
* error.c: Likewise.
* method.c: Likewise.
* name-lookup.c: Likewise.
* parser.c: Likewise.
* pt.c: Likewise.
* rtti.c: Likewise.
* search.c: Likewise.
* typeck.c: Likewise.
From-SVN: r69022
|
|
* decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
(finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
clear DECL_DEFER_OUTPUT once function is processed; avoid flags
massaging.
* cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
(expand_or_defer_fn): Declare.
(lower_function): Declare.
* decl.c (start_cleanup_fn): Use expand_or_defer_fn.
* decl2.c: Include cgraph.h and varpool.h
(maybe_emit_vtables): Make explicit instantations as needed.
(mark_member_pointers, lower_function): New functions.
(finish_file): Do unit-at-a-time.
* method.c (synthesize_method): Use expand_or_defer_fn.
* optimize.c (maybe_clone_body): Use expand_or_defer_fn.
* parser.c (cp_parser_function_definition_after_decl): Use
expand_or_defer_fn.
* pt.c (instantiate_decl): Likewise.
* semantics.c: Include cgraph.h
(expand_or_defer_fn): Break out from ...
(expand_body): ... here; deal with unit-at-a-time.
* cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
From-SVN: r68801
|
|
* call.c (enforce_access): Assert we get a binfo.
(build_op_delete_call): Pass a binfo to
perform_or_defer_access_check.
* class.c (alter_access): Likewise.
* decl.c (make_typename_type): Likewise.
(make_unbound_class_template): Likewise.
* lex.c (do_identifier): Likewise.
* method.c (hack_identifier): Likewise.
* parser.c (cp_parser_lookup_name): Likewise.
* search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
test.
* semantics.c (finish_non_static_data_member): Likewise.
(perform_or_defer_access_check): Expect a binfo.
* typeck.c (comptypes): Expect types.
* mangle.c (find_substitution): Don't pass a non-type to same_type_p
* friend.c (make_friend_class): Likewise.
* pt.c (check_default_tmpl_args): Likewise.
(lookup_template_class): Likewise.
From-SVN: r68424
|
|
happy.
* method.c (thunk_labelno): Move outside ifdef block to make garbage
collector happy.
From-SVN: r68419
|
|
* method.c: add prototype for make_alias_for_thunk.
(thunk_labelno, make_alias_for_thunk): only define
if ASM_OUTPUT_DEF is defined.
From-SVN: r68405
|
|
* config/i386/i386.c (x86_output_mi_thunk): Don't pass MEM to %P0,
just SYMBOL_REF.
* config/s390/s390.c (s390_output_mi_thunk): Avoid .plt in -m31
mode, as it requires pic register loaded.
* varasm.c (resolve_unique_section): Remove prototype. No longer
static.
* tree.h (resolve_unique_section): New prototype.
cp/
* method.c (thunk_labelno): New variable.
(make_alias_for_thunk): New function.
(use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
into the same section as the function it is calling.
Include gt-cp-method.h.
* Make-lang.in (gt-cp-method.h): Depend on s-gtype.
(cp/method.o): Depend on gt-cp-method.h.
* config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
From-SVN: r68389
|
|
* cp-tree.h: Follow spelling conventions.
* mangle.c: Likewise.
* method.c: Likewise.
* parser.c: Likewise.
From-SVN: r68015
|
|
* tree.h (init_function_start): Remove filename and line paramters.
* function.c (init_function_start): Remove filename and line
parameters. Use DECL_SOURCE_LOCATION.
* c-decl.c (store_parm_decls): Adjust init_function_start call.
(c_expand_body_1): Likewise.
* coverage.c (create_coverage): Likewise.
* ada/utils.c (begin_subprog_body): Adjust init_function_start
call.
* cp/decl.c (start_function): Adjust init_function_start call.
* cp/method.c (use_thunk): Likewise.
* cp/semantics.c (genrtl_start_function): Likewise.
* f/com.c (stor_parm_decls): Adjust init_function_start call.
* java/class.c (emit_register_classes): Adjust init_function_start
call.
* java/decl.c (complete_start_java_method): Likewise.
* java/resource.c (write_resource_constructor): Likewise.
* objc/objc-act.c (build_tmp_function_decl): Set line number to
zero.
(hack_method_prototype): Adjust init_function_start call.
* treelang/treetree.c (tree_code_create_function_initial): Adjust
init_function_start call.
From-SVN: r67953
|
|
From-SVN: r66694
|
|
PR c++/9252
* cp-tree.h (saved_scope): Remove check_access field.
(tsubst_flags_t): Remove tf_parsing.
* decl.c (maybe_push_to_top_level): Don't initialize
scope_chain->check_access.
(make_typename_type, make_unbound_class_template): Don't use
tf_parsing.
(register_dtor_fn): Use push/pop_deferring_access_checks
instead of scope_chain->check_access.
* method.c (use_thunk): Likewise.
* parser.c (cp_parser_explicit_instantiation
(cp_parser_constructor_declarator_p): Don't call
push/pop_deferring_access_checks here.
(cp_parser_template_argument, cp_parser_class_name): Don't use
tf_parsing.
(yyparse): Check flag_access_control.
* pt.c (instantiate_class_template): Call
push/pop_deferring_access_checks.
* semantics.c (push_deferring_access_checks): Propagate
dk_no_check.
(perform_or_defer_access_check): Make sure basetype_path is
a type before comparison.
* call.c (build_op_delete_call, build_over_call): Use
perform_or_defer_access_check.
* class.c (alter_access): Likewise.
* init.c (build_offset_ref): Likewise.
* lex.c (do_identifier): Likewise.
* method.c (hack_identifier): Likewise.
* search.c (lookup_member): Likewise.
* semantics.c (finish_non_static_data_member): Likewise.
(simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
instead of flag_access_control.
* g++.dg/parse/access8.C: New test.
* g++.dg/parse/access9.C: New test.
From-SVN: r66660
|
|
* class.c (finish_struct): Use location_t and input_location
directly.
* decl.c (make_label_decl): Likewise.
(use_label): Likewise.
* decl2.c (warn_if_unknown_interface): Likewise.
(start_static_initialization_or_destruction): Likewise.
(generate_ctor_or_dtor_function): Likewise.
(finish_file): Likewise.
* error.c (print_instantiation_full_context): Likewise.
* init.c (create_temporary_var): Likewise.
* method.c (synthesize_method): Likewise.
* parser.c (cp_token): Likewise.
(cp_lexer_set_source_position_from_token): Likewise.
(cp_lexer_get_preprocessor_token): Likewise.
(cp_parser_statement): Likewise.
* pt.c (tsubst_friend_function): Likewise.
(instantiate_class_template): Likewise.
(tsubst_decl): Likewise.
(tsubst): Likewise.
(instantiate_decl): Likewise.
* semantics.c (begin_class_definition): Likewise.
(expand_body): Likewise.
From-SVN: r66423
|
|
* input.h (lineno): Rename to ...
(input_line): ... here.
* tree.h (lineno): Rename to ...
(input_line): ... here.
* scan.h (lineno): Rename to ...
(input_line): ... here.
* toplev.c (lineno): Rename to ...
(input_line): ... here.
(push_srcloc, pop_srcloc): Rename lineno to input_line.
* c-common.c (c_expand_start_cond, fname_decl): Likewise.
* c-decl.c (poplevel, pop_label_level, lookup_label, lookup_tag,
store_parm_decls, c_expand_body_1): Likewise.
* c-errors.c (pedwarn_c99): Likewise.
* c-format.c (status_warning): Likewise.
* c-lex.c (fe_file_change, cb_def_pragma, c_lex): Likewise.
* c-opts.c (c_common_post_options, c_common_parse_file): Likewise.
* c-parse.in (save_filename, maybe_type_qual, ifc): Likwise.
* c-semantics.c (finish_stmt_tree, build_stmt, emit_local_var,
gentrtl_goto_stmt, genrtl_expr_stmt_value, genrtl_decl_stmt,
genrtl_if_stmt, genrtl_while_stmt, genrtl_do_stmt,
genrtl_return_stmt, genrtl_for_stmt, build_break_stmt,
build_continue_stmt, genrtl_switch_stmt, genrtl_asm_stmt,
prep_stmt, find_reachable_label, expand_unreachable_stmt): Likewise.
* coverage.c (create_coverage): Likewise.
* diagnostic.c (pedwarn, sorry, error, fatal_error,
internal_error, warning, diagnostic_report_current_module,
inform): Likewise.
* expr.c (expand_expr): Likewise.
* integrate.c (expand_inline_function,
output_inline_function): Likewise.
* rtl-error.c (file_and_line_for_asm): Likewise.
* tree-inline.c (find_alloca_call, find_builtin_longjmp_call,
walk_tree): Likewise.
* tree.c (make_node): Likewise.
* ada, cp, f, java, objc, treelang: Likewise.
ada
* trans.c (build_unit_elab, set_lineno): Rename lineno to
input_line.
* utils.c (pushdecl, create_label_decl, begin_subprog_body,
end_subprog_body): Likewise.
* utils2.c (build_call_raise): Likewise.
cp
* class.c (finish_struct): Rename lineno to input_line.
* decl.c (push_binding_level, pop_binding_level,
suspend_binding_level, resume_binding_level, make_label_decl,
use_label, start_function): Likewise.
* decl2.c (warn_if_unknown_interface,
start_static_initialization_or_destruction,
generate_ctor_or_dtor_function, finish_file): Likewise.
* error.c (cp_line_of, print_instantiation_full_context,
print_instantiation_context): Likewise.
* except.c (check_handlers_1, check_handlers): Likewise.
* init.c (create_temporary_var): Likewise.
* method.c (use_thunk, synthesize_method): Likewise.
* parser.c (cp_lexer_set_source_position_from_token,
cp_lexer_get_preprocessor_token): Likewise.
* pt.c (push_tinst_level, pop_tinst_level,
tsubst_friend_function, instantiate_class_template, tsubst_decl,
tsubst, tsubst_expr, instantiate_decl): Likewise.
* semantics.c (genrtl_try_block, finish_label_stmt,
begin_class_definition, expand_body,
genrtl_finish_function): Likewise.
* tree.c (build_min_nt, build_min): Likewise.
f
* ansify.c (die_unless): Rename lineno to input_line.
* com.c (ffecom_subscript_check_, ffecom_do_entry_,
ffecom_gen_sfuncdef_, ffecom_start_progunit_,
ffecom_sym_transform_, ffecom_sym_transform_assign_,
bison_rule_pushlevel_, bison_rule_compstmt_, finish_function,
store_parm_decls): Likewise.
* intrin.c (ffeintrin_fulfill_generic): Likewise.
* lex.c (ffelex_hash_, ffelex_include_, ffelex_next_line_,
ffelex_file_fixed, ffelex_file_free): Likewise.
* std.c (ffestd_exec_end): Likewise.
* ste.c (ffeste_emit_line_note_, ffeste_start_block_,
ffeste_start_stmt_): Likewise.
* ste.h (ffeste_filelinenum, ffeste_set_line): Likewise.
java
* lex.h (lineno): Rename to ...
(input_line): ... here
* parse-scan.y (lineno): Rename to ...
(input_line): ... here.
(reset_report): Rename lineno to input_line.
* check-init.c (check_init): Likewise.
* class.c (push_class): Likewise.
* decl.c (complete_start_java_method, end_java_method): Likewise.
* expr.c (expand_byte_code): Likewise.
* jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
* jcf-write.c (generate_bytecode_insns): Likewise.
* lex.c (java_init_lex, java_allocate_new_line,
do_java_lex): Likewise.
* parse.h (YYNOT_TWICE): Likewise.
* parse.y (empty_statement, expression_statement,
java_pop_parser_context, java_parser_context_save_global,
yyerror, register_fields, method_header, safe_layout_class,
find_in_imports_on_demand, create_artificial_method,
source_end_java_method, start_complete_expand_method,
build_thisn_assign, java_complete_lhs,
maybe_absorb_scoping_block): Likewise.
objc
* objc-act.c (objc_init): Rename lineno to input_line.
(build_module_descriptor, build_selector_translation_table,
build_protocol_template, build_method_prototype_list_template,
build_category_template, build_selector_table,
build_class_template, build_super_template, build_ivar_template,
build_ivar_list_template, build_method_list_template,
build_method_template, add_instance_variable): Likewise.
treelang
* tree1.c (treelang_init): Rename lineno to input_line.
From-SVN: r66333
|
|
and multiple inheritance)
PR c++/10506
* method.c (use_thunk): Decrement immediate_size_expand.
PR c++/10503
* cp-tree.h (DECL_VAR_MARKED_P): New macro.
(DECL_MAYBE_TEMPLATE): Remove.
* class.c (fixed_type_or_null): Avoid infinite recursion.
PR c++/10506
* g++.dg/init/new6.C: New test.
PR c++/10503
* g++.dg/init/ref6.C: New test.
From-SVN: r66150
|
|
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
|
|
and __<TYPE>_HAS_QUIET_NAN__.
* c-common.c (builtin_define_float_constants): Define
__<TYPE>_HAS_INFINITY__ and __<TYPE>_HAS_QUIET_NAN__.
* call.c (build_field_call): Use build_new_op, not build_opfncall.
(prep_operand): New function.
(build_new_op): Use it. Remove dead code.
* class.c (pushclass): Change "modify" parameter type from int to
bool.
(currently_open_class): Use same_type_p, not pointer equality.
(push_nested_class): Adjust calls to pushclass, remove modify
parameter.
* cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
(pushclass): Change prototype.
(push_nested_class): Likewise.
(grokoptypename): Remove.
(build_opfncall): Remove.
(value_dependent_expression_p): Declare.
(resolve_typename_type): Likewise.
(resolve_typename_type_in_current_instantiation): Likewise.
(enter_scope_of): Remove.
(tsubst): Remove.
(tsubst_expr): Likewise.
(tsubst_copy): Likewise.
(tsubst_copy_and_build): Likewise.
* decl.c (warn_about_implicit_typename_lookup): Remove.
(finish_case_label): Return error_mark_node for erroneous labels.
(start_decl): Adjust calls to push_nested_class.
(grokfndecl): Call push_scope/pop_scope around call to
duplicate_decls.
(grokdeclarator): Do not call tsubst.
(start_function): Adjust calls to push_nested_class.
* decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
(check_classfn): Use push_scope/pop_scope around type comparisions.
(grokoptypename): Remove.
(push_sscope): Adjust call to push_nested_class.
* error.c (dump_type): Show cv-qualification of typename types.
* init.c (build_member_call): Use build_new_op, not
build_opfncall.
* method.c (build_opfncall): Remove.
* parser.c (cp_parser): Add allow_non_constant_expression_p and
non_constant_expression_p.
(cp_parser_constant_expression): Adjust prototype.
(cp_parser_resolve_typename_type): Remove.
(cp_parser_non_constant_expression): New function.
(cp_parser_non_constant_id_expression): Likewise.
(cp_parser_new): Set allow_non_constant_expression_p and
non_constant_expression_p.
(cp_parser_primary_expression): Reject `this' and `va_arg' in
constant-expressions. Note that dependent names aren't really
constant.
(cp_parser_postfix_expression): Reject conversions to non-integral
types in constant-expressions. Neither are increments or
decrements.
(cp_parser_unary_expression): Reject increments and decrements in
constant-expressions.
(cp_parser_direct_new_declarator): Adjust call to
cp_parser_constant_expression.
(cp_parser_cast_expression): Reject conversions to non-integral
types in constant-expressions.
(cp_parser_assignment_expression): Rejects assignments in
constant-expressions.
(cp_parser_expression): Reject commas in constant-expressions.
(cp_parser_labeled_statement): Adjust call to
cp_parser_constant_expression.
(cp_parser_direct_declarator): Simplify array bounds, even in
templates, when they are non-dependent. Use
resolve_typename_type, not cp_parser_resolve_typename_type.
(cp_parser_class_head): Use resolve_typename_type, not
cp_parser_resolve_typename_type.
(cp_parser_member_declaration): Adjust call to
cp_parser_constant_expression.
(cp_parser_constant_initializer): Likewise.
(cp_parser_constructor_declarator): Use resolve_typename_type, not
cp_parser_resolve_typename_type.
(cp_parser_late_parsing_default_args): Adjust call to
push_nested_class.
* pt.c (tsubst): Give it internal linkage.
(tsubst_expr): Likewise.
(tsubst_copy): Likewise.
(tsubst_copy_and_build): Likewise.
(push_access_scope_real): Likewise.
(tsubst_friend_class): Likewise.
(instantiate_class_template): Adjust call to pushclass.
(value_dependent_expression_p): Give it external linkage.
Robustify.
(resolve_typename_type): New function.
* semantics.c (finish_call_expr): Use build_new_op, not
build_opfncall.
(begin_constructor_declarator): Remove.
(begin_class_definition): Adjust call to pushclass.
(enter_scope_of): Remove.
* typeck.c (comptypes): Resolve typename types as appropriate.
(build_x_indirect_ref): Use build_new_op, not build_opfncall.
(build_x_compound_expr): Likewise.
(build_modify_expr): Likewise.
(build_x_modify_expr): Likewise.
* typeck2.c (build_x_arrow): Likewise.
* g++.dg/parser/constant1.C: New test.
* include/std/std_limits.h (numeric_limits<float>::has_infinity):
Use __FLT_HAS_INIFINITY__ to initialize.
(numeric_limits<float>::has_quiet_NaN): Likewise.
(numeric_limits<double>::has_infinity): Use __DBL_HAS_INIFINITY__
to initialize.
(numeric_limits<double>::has_quiet_NaN): Likewise.
(numeric_limits<long double>::has_infinity): Use
__LDBL_HAS_INIFINITY__ to initialize.
(numeric_limits<long_double>::has_quiet_NaN): Likewise.
From-SVN: r62130
|
|
From-SVN: r61136
|
|
thunk.
* method.c (use_thunk): Disable access control while building the
body of the thunk.
From-SVN: r60889
|
|
* 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
|
|
cp:
* cp-tree.h (THUNK_TARGET): New macro.
(THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
(finish_thunk): Remove offset parms.
* class.c (find_final_overrider): Look through thunks.
(get_vcall_index): Use THUNK_TARGET.
(update_vtable_entry_for_fn): Look through thunks. Set covariant
fixed offset here. Adjust finish_thunk call.
(build_vtbl_initializer): Adjust finish_thunk calls.
* mangle.c (mangle_call_offset): Remove superfluous if.
(mangle_thunk): Adjust.
* method.c (make_thunk): Adjust.
(finish_thunk): Adjust.
(thunk_adjust): Remove assert.
(use_thunk): Use THUNK_TARGET
* dump1.c (cp_dump_tree): Adjust thunk dumping.
testsuite:
* g++.dg/inherit/covariant5.C: New test.
* g++.dg/inherit/covariant6.C: New test.
* g++.dg/inherit/covariant7.C: New test.
From-SVN: r60628
|
|
* Make-lang.in (po-generated): Remove parse.c.
(CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
($(srcdir)/cp/parse.h): Remove target.
($(srcdir)/cp/parse.c): Likewise.
(gt-cp-parse.h): Likewise.
(gt-cp-parser.h): New target.
(c++.distclean): Do not remove parse.output.
(c++.maintainer-clean): Do not remove parse.c or parse.h.
(cp/spew.o): Remove target.
(cp/lex.o): Adjust dependencies.
(cp/pt.o): Likewise.
(cp/parse.o): Likewise.
(cp/TAGS): Do not mention parse.c.
(cp/parser.o): New target.
* NEWS: Mention the new parser.
* call.c (build_scoped_method_call): Simplify.
(build_method_call): Likewise.
(build_new_function_call): Adjust calls to add_function_candidate
and add_template_candidate.
(build_new_op): Improve handling of erroroneous operands.
(convert_default_arg): Remove circular argument processing.
(name_as_c_string): New function.
(build_new_method_call): Use it.
(perform_implicit_conversion): Use error_operand_p.
* class.c (finish_struct_anon): Use constructor_name_p.
(check_field_decls): Likewise.
(pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
(resolve_address_of_overloaded_function): Likewise.
(instantiate_type): Tweak pointer-to-member handling.
(get_primary_binfo): Remove incorrect assertion.
* config-lang.in (gtfiles): Add parser.c, remove parse.c.
* cp-tree.h (DEFARG_TOKENS): New macro.
(default_arg): New structure.
(cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
(lang_tree_node): Add default_arg.
(cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
(type_info_ref_type): New macro.
(saved_scope): Make processing_explicit_instantiation a boolean.
(check_access): New field.
(unparsed_text): Remove.
(language_function): Remove unparsed_inlines.
(error_operand_p): New macro.
(lang_decl): Adjust pending_inline_info.
(DEFARG_POINTER): Remove.
(tag_types): Add typenames.
(lookup_ualified_name): Declare.
(lookup_name_real): Likewise.
(shadow_tag): Adjust prototype.
(get_scope_of_declarator): Declare it.
(process_next_inline): Remove it.
(check_for_missing_semicolon): Likewise.
(maybe_get_template_decl_from_type_decl): Declare it.
(finish_label_stmt): Adjust prototype.
(finish_non_static_data_meber): Declare it.
(finish_pseudo_destructor_call_expr): Rename to ...
(finish_pseudo_destructor_expr): ... this.
(finish_compound_literal): Declare it.
(begin_inline_definitions): Remove it.
(init_spew): Remove.
(peekyylex): Likewise.
(arbitrate_lookup): Likewise.
(frob_opname): Likewise.
(maybe_snarf_defarg): Likewise.
(add_defarg_fn): Likewise.
(do_pending_defargs): Likewise.
(done_pending_defargs): Likewise.
(unprocessed_defarg_fn): Likewise.
(replace_defarg): Likewise.
(end_input): Likewise.
(get_overloaded_fn): Likewise.
* cvt.c (convert_to_reference): Improve error handling.
* decl.c (lookup_name_real): Do not declare it static.
(maybe_push_to_top_level): Set check_access.
(identifier_type_value): Adjust call to lookup_name_real.
(lookup_qualified_name): New method.
(lookup_name_real): Remove special-case parsing code.
(lookup_name-nonclass): Adjust call to lookup_name_real.
(lookup_name_namespace_only): Likewise.
(lookup_name): Likewise.
(check_tag_decl): Return the type declared.
(shadow_tag): Likewise.
(register_dtor_fn): Tweak check_access.
(grokfndecl): Use constructor_name_p.
(get_scope_of_declarator): New function.
(grokdeclarator): Obscure tweaks for slightly different declarator
representations.
(start_method): Return error_mark_node to indicate failure.
(cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
* decl2.c (constructor_name_full): Simplify.
(constructor_name): Use it.
(build_expr_from_tree): Adjust for changes to do new parser.
(push_scope): Improve robustness.
(validate_nonmember_using_decl): Process declarations, not names.
(do_class_using_decl): Likewise.
(handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
here.
* error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
* expr.c (cxx_expand_expr): Handle BASELINKs.
* init.c (member_init_ok_or_else): Issue more errors.
(build_offset_ref): Tweak handling of FUNCTION_DECLs.
* lex.c: Do not include parse.h.
(yypring): Do not declare.
(yylval): Likewise.
(make_reference_declarator): Remove error-generating code.
(rid_to_yy): Remove.
(cxx_init): Do not call init_spew.
(yypring): Remove.
(check_for_missing_semicolon): Remove.
* lex.h (got_scope): Remove.
(got_object): Remove.
* method.c (hack_identifier): Use finish_non_static_data_member.
(implicitly_declare_fn): Adjust use of constructor_name.
* parser.c: New file.
* pt.c (parse.h): Do not include it.
(maybe_get_template_decl_from_template): Do not declare it.
(finish_member_template_decl): Tweak.
(begin_explicit_instantiation): Adjust for
processing_explicit_instantiation being boolean.
(end_explicit_instantiation): Likewise.
(maybe_process_partial_specialization): Tighten specialization
test.
(retrieve_local_specialization): Adjust ue of hash table.
(eq_local_specializations): New function.
(register_local_specialization): Likewise.
(push_template_decl_real): Remove unnecessary test.
(maybe_get_template_decl_from_type_decl): Don't make it static.
(for_each_template_parm_r): Handle TYPEOF_TYPE.
(tsubst_copy): Use retrieive_local_specialization to handle
PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
Handle COMPONENT_REFs with pseudo-destructor-expressions.
Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
(tsubst_expr): Pass decls, not names, to do_local_using_decl.
(unify): Tweak handling of CONST_DECLs.
(regenerate_decl_from_template): Use push_nested_class.
(template_for_substitution): New funciton.
(instantiate_decl): Use it. Register parameters as local
specializations.
* rtti.c (init_rtti_processing): Set type_info_ref_type.
(build_typeid): Use it.
(get_typeid): Likeise.
* search.c (accessible_p): Use check_access, not
flag_access_control.
(adjust_result_of_qualified_name_lookup): Pay attention to the
context_class.
* semantics.c (finish_asm_stmt): Adjust error handling.
(finish_label_stmt): Return the statement.
(finish_non_static_data_member): New function.
(finish_class_expr): Handle BASELINKs.
(finish_call_expr): Handle PSEUDO_DTOR_EXPR.
(finish_object_call_expr): Simplify handling during templates.
(finish_pseudo_destructor_call_expr): Rename to ...
(finish_pseudo_dtor_expr): ... this.
(finish_compound_literal): New function.
(begin_inline_definitions): Remove.
(finish_sizeof): Remove special template handling.
* spew.c: Do not include parse.h.
* tree.c (get_overloaded_fn): Remove.
* typeck.c (build_class_member_access_expr): Handle
PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
(lookup_destructor): New function.
(finish_class_member_access_expr): Use it.
(convert_arguments): Simplify.
(build_unary_op): Handle BASELINKs.
From-SVN: r60560
|
|
cp:
PR c++/4803
* decl2.c (mark_used): Defer inline functions.
(finish_file): Merge deferred_fns loops. Check all used
inline functions have a definition.
* method.c (make_thunk): Thunks are not inline.
testsuite:
* g++.dg/warn/inline1.C: New test.
* g++.old-deja/g++.brendan/crash64.C: Remove spurious inlines.
* g++.old-deja/g++.jason/synth10.C: Likewise.
* g++.old-deja/g++.mike/net31.C: Likewise.
* g++.old-deja/g++.mike/p8786.C: Likewise.
From-SVN: r60521
|
|
From-SVN: r60174
|
|
* class.c (build_vtbl_initializer): Don't use build_vtable_entry.
(build_vtable_entry): Remove.
* cp-tree.h (BINFO_VIRTUALS): Expand documentation.
(lang_decl): Add thunks.
(DECL_THUNKS): New macro.
* decl.c (duplicate_decls): Copy it.
* method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
* semantics.c (emit_associated_thunks): Simplify.
* g++.dg/abi/vthunk2.C: New test.
From-SVN: r58536
|
|
output_mi_vcall_thunk into a single hook.
gcc/
* target.h (gcc_target.asm_out): Merge output_mi_thunk and
output_mi_vcall_thunk into a single hook. Add can_output_mi_thunk.
* target-def.h (TARGET_ASM_OUTPUT_MI_THUNK): Don't conditionalize.
(TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Remove.
(TARGET_ASM_CAN_OUTPUT_MI_THUNK): New.
(TARGET_ASM_OUT): Update.
* hooks.c (hook_bool_tree_hwi_hwi_tree_false): New.
(hook_bool_tree_hwi_hwi_tree_true): New.
(default_can_output_mi_thunk_no_vcall): New.
* hooks.h: Declare them.
* system.h (ASM_OUTPUT_MI_THUNK): Poison.
* config/alpha/alpha.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New.
(alpha_output_mi_thunk_osf): Add VCALL_OFFSET parameter.
* config/arm/arm.c, config/cris/cris.c, config/frv/frv.c,
config/i960/i960.c, config/ia64/ia64.c, config/m68k/m68k.c,
config/mmix/mmix.c, config/pa/pa.c, config/sparc/sparc.c,
config/stormy16/stormy16.c: Similarly.
* config/i386/i386.c (x86_output_mi_thunk): Merge vcall_offset code.
Handle 64-bit properly. Streamline.
(x86_output_mi_vcall_thunk): Remove.
(x86_this_parameter): Rename from ia32_this_parameter; handle 64-bit.
(x86_can_output_mi_thunk): New.
(TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Remove.
(TARGET_ASM_CAN_OUTPUT_MI_THUNK): New.
(override_options): Don't zap targetm.asm_out.output_mi_vcall_thunk.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Rename from
output_mi_thunk; make static; always use function_section.
(TARGET_ASM_OUTPUT_MI_THUNK): New.
(TARGET_ASM_CAN_OUTPUT_MI_THUNK): New.
(rs6000_ra_ever_killed): Test no_new_pseudos not
targetm.asm_out.output_mi_thunk in conjunction with thunks.
* config/rs6000/rs6000-protos.h: Update.
* config/rs6000/sysv4.h (TARGET_ASM_OUTPUT_MI_THUNK): Remove.
* config/rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Don't call
xcoffout_declare_function when using rs6000_output_mi_thunk.
* config/s390/s390.c (s390_output_mi_thunk): Rename from
s390_output_mi_vcall_thunk.
(TARGET_ASM_OUTPUT_MI_THUNK): Remove.
(TARGET_ASM_CAN_OUTPUT_MI_THUNK): New.
* config/vax/vax.c (vax_output_mi_thunk): Static; add vcall_offset.
(TARGET_ASM_OUTPUT_MI_THUNK, TARGET_ASM_CAN_OUTPUT_MI_THUNK): New.
* config/vax/vax-protos.h: Update.
* config/vax/vax.h (ASM_OUTPUT_MI_THUNK): Remove.
gcc/cp/
* method.c (use_thunk): Always compute vcall_value; assert that
it is not zero. Use can_output_mi_thunk; use output_mi_thunk
for vcall thunks as well.
From-SVN: r58424
|
|
* alpha-protos.h (alpha_output_mi_thunk_osf): Update signature to
match target.h.
* arm-protos.h, arm.c (arm_output_mi_thunk): Likewise.
* cris-protos.h, cris.c (cris_asm_output_mi_thunk): Likewise.
* frv-protos.h, frv.c (frv_asm_output_mi_thunk): Likewise.
* i386-protos.h, i386.c (x86_output_mi_vcall_thunk,
x86_output_mi_thunk): Likewise.
* i960-protos.h, i960.c (i960_output_mi_thunk): Likewise.
* ia64-protos.h, ia64.c (ia64_output_mi_thunk): Likewise.
* m68k-protos.h, m68k.c (m68k_output_mi_thunk): Likewise.
* mmix-protos.h, mmix.c (mmix_asm_output_mi_thunk): Likewise.
* rs6000-protos.h, rs6000.c (output_mi_thunk): Likewise.
* s390-protos.h, s390.c (s390_output_mi_thunk): Likewise.
* stormy16-protos.h, stormy16.c (xstormy16_asm_output_mi_thunk):
Likewise.
* vax-protos.h, vax.c (vax_output_mi_thunk): Likewise.
* target.h (gcc_target): Update output_mi_thunk and
output_mi_vcall_thunk to take a HOST_WIDE_INT delta and
vcall_index.
* config/alpha/alpha.c: Replace ASM_OUTPUT_MI_THUNK with
TARGET_ASM_OUTPUT_MI_THUNK in comments.
* config/alpha/vms.h (ASM_OUTPUT_MI_THUNK): Don't #undef it.
(TARGET_ASM_OUTPUT_MI_THUNK): #undef it.
* config/frv/frv.h (DEFAULT_VTABLE_THUNKS): Remove definition.
* config/i386/i386-protos.h (x86_output_mi_vcall_thunk): Update
signature.
* config/i386/i386.c (x86_output_mi_vcall_thunk): Likewise.
* config/i386/openbsd.h: Replace ASM_OUTPUT_MI_THUNK with
TARGET_ASM_OUTPUT_MI_THUNK in comments.
* config/i960/i960.h (ASM_OUTPUT_MI_THUNK): Don't define.
(TARGET_ASM_OUTPUT_MI_THUNK): Do define.
* config/m68k/openbsd.h: Replace ASM_OUTPUT_MI_THUNK with
TARGET_ASM_OUTPUT_MI_THUNK in comments.
* config/rs6000/rs6000.c (rs6000_ra_ever_killed): Remove #ifdef
ASM_OUTPUT_MI_THUNK and replace with check of targetm.
* doc/tm.texi (TARGET_ASM_OUTPUT_MI_THUNK): Update signature.
(TARGET_ASM_OUTPU_MI_VCALL_THUNK): Likewise.
From-SVN: r58333
|
|
* target-def.h (TARGET_ASM_OUTPUT_MI_THUNK): Default to NULL.
(TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Likewise.
(TARGET_ASM_OUT): Add them.
* target.h (asm_out): Add output_mi_thunk and
output_mi_vcall_thunk.
* config/alpha/alpha.h (ASM_OUTPUT_MI_THUNK): Rename to ...
(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
* config/arm/arm-protos.h (arm_output_mi_thunk): Declare.
* config/arm/arm.c (arm_output_mi_thunk): Define.
* config/arm/arm.h (ASM_OUTPUT_MI_THUNK): Rename to ...
(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
* config/cris/cris.h (ASM_OUTPUT_MI_THUNK): Rename to ...
(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
* config/frv/frv.h (ASM_OUTPUT_MI_THUNK): Rename to ...
(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
* config/i386/i386-protos.h (x86_output_mi_thunk): Adjust
prototype.
(x86_output_mi_vcall_thunk): Declare.
* config/i386/i386.c (override_options): Clear
output_mi_vcall_thunk in 64-bit mode.
(ix86_fntype_regparm): New function.
(ix86_return_pops_args): Use it.
(ia32_this_parameter): New function.
(x86_output_mi_vcall_thunk): New function.
(x86_output_mi_thunk): Use it
* config/i386/unix.h (TARGET_ASM_OUTPUT_MI_THUNK): Adjust.
(TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Define.
* config/i960/i960-protos.h (i960_output_mi_thunk): Declare.
* config/i960/i960.c (i960_output_mi_thunk): New function.
* config/i960/i960.h (ASM_OUTPUT_MI_THUNK): Adjust.
* config/ia64/ia64-protos.h (ia64_output_mi_thunk): Declare.
* config/ia64/ia64.c (ia64_output_mi_thunk): Define.
* config/ia64/ia64.h (ASM_OUTPUT_MI_THUNK): Rename to ...
(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
* config/m68k/m68k-protos.h (m68k_output_mi_thunk): New function.
* config/m68k/linux.h (ASM_OUTPUT_MI_THUNK): Rename to ...
(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
* config/m68k/netbsd-elf.h (ASM_OUTPUT_MI_THUNK): Rename to ...
(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
* config/mmix/mmix.h (ASM_OUTPUT_MI_THUNK): Rename to ...
(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
* config/pa/pa.h (ASM_OUTPUT_MI_THUNK): Rename to ...
(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
* config/rs6000/sysv4.h (ASM_OUTPUT_MI_THUNK): Rename to ...
(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
* config/s390/s390-protos.h (s390_output_mi_thunk): Declare.
* config/s390/s390.c (s390_output_mi_thunk): Define.
* config/s390/s390.h (ASM_OUTPUT_MI_THUNK): Rename to ...
(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
* config/sparc/sparc.h (ASM_OUTPUT_MI_THUNK): Rename to ...
(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
* config/stormy16/stormy16.h (ASM_OUTPUT_MI_THUNK): Rename to ...
(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
* config/vax/vax-protos.h (vax_output_mi_thunk): Declare.
* config/vax/vax.c (vax_output_mi_thunk): Define.
* config/vax/vax.h (ASM_OUTPUT_MI_THUNK): Rename to ...
(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
* doc/tm.texi: Adjust documentation.
From-SVN: r58293
|
|
PR c++/7524
* g++.dg/init/array7.C: New test.
PR c++/7524
* method.c (do_build_assign_ref): Use cp_build_qualified_type, not
build_qualified_type.
From-SVN: r58217
|
|
initalizer list.)
PR c++/7188.
* cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
* cp-tree.h (emit_base_init): Rename to ....
(emit_mem_initializers): ... this.
(expand_member_init): Change prototype.
* init.c (perform_member_init): Compute explicit, rather than
requiring it as a parameter.
(sort_member_init): Rename to ...
(sort_mem_initializers): ... this. Process bases and data members
together.
(sort_base_init): Remove.
(emit_base_init): Rename to ...
(emit_mem_initializers): ... this.
(expand_aggr_vbase_init_1): Remove.
(construct_virtual_bases): Rename to ...
(construct_virtual_base): ... this.
(expand_member_init): Rework handling of base initializers.
* method.c (do_build_copy_constructor): Use
finish_mem_initializers.
* parse.y (member_init): Adjust calls to expand_member_init.
* pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
(tsubst_initializer_list): Use expand_member_init.
* semantics.c (finish_mem_intiailizers): Simplify.
PR c++/7188.
* g++.dg/template/meminit1.C: New test.
* g++.dg/warn/Wreorder-1.C: Likewise.
* g++.old-deja/g++.mike/warn3.C: Tweak.
* lib/prune.exp: Ingore "in copy constructor".
From-SVN: r57748
|
|
* store-layout.c (finish_record_layout): Add free_p parameter.
(layout_type): Pass it.
* tree.h (finish_record_layout): Update prototype.
* class.c (walk_subobject_offsets): Correct the calculation of
offsets for virtual bases. Correct the counting of array
elements.
(layout_nonempty_base_or_field): Simplify. Correct the
calculation of offsets to be propagated through the binfo
hierarchy.
(build_base_field): Avoid creating a FIELD_DECL for empty bases.
Add the FIELD_DECL to TYPE_FIELDS.
(build_base_fields): Adjust accordingly.
(layout_virtual_bases): Use build_base_field.
(end_of_class): Return a tree, not an integer.
(warn_about_ambiguous_direct_bases): Rename to ...
(warn_about_ambiguous_bases): ... this.
(include_empty_classes): New function.
(layout_class_type): Create an alternative version of the type to
be used when as a base class type. Do not call
finish_record_layout until we are done laying out the class.
* cp-tree.h (lang_type_class): Remove size, size_unit. Add
as_base.
(CLASSTYPE_SIZE): Reimplement.
(CLASSTYPE_SIZE_UNIT): Likewise.
(CLASSTYPE_ALIGN): Likweise.
(CLASSTYPE_USER_ALIGN): Likewise.
(CLASSTYPE_AS_BASE): New macro.
(DECL_INITIALIZED_P): Likewise.
(extract_init): Remove prototype.
(build_forced_zero_init): Rename to ...
(build_zero_init): ... this.
(force_store_init_value): Remove.
* decl.c (obscure_complex_init): Remove.
(duplicate_decls): Copy DECL_INITIALIZED_P.
(check_initializer): Do not leave junk in DECL_INITIAL.
(cp_finish_decl): Handle zero-initialization of entities with
static storage duration.
* expr.c (extract_init): Remove.
* init.c (build_forced_zero_init): Remove.
(build_zero_init): New function.
(build_default_init): Use it.
(build_field_list): Skip FIELD_DECLs for base subobjects.
(push_base_cleanups): Likewise.
* method.c (do_build_assign_ref): Likewise.
(synthesize_exception_spec): Likewise.
* pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
(regenerate_decl_from_template): To not set DECL_INITIAL for a
static data member whose initialization took place in its class.
(instantiate_decl): Do not pass an initializer to cp_finish_decl
in that situation.
* search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
(dfs_unuse_fields): Likewise.
* tree.c (pod_type_p): Handle error_mark_node.
(zero_init_p): Likewise.
* typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
subobjects.
* typeck2.c (store_init_value): Remove #if 0'd code.
(force_store_init_value): Remove.
(process_init_constructor): Use build_zero_init.
* g++.dg/abi/empty7.C: New test.
* g++.dg/init/pm2.C: Likewise.
From-SVN: r57654
|
|
* ChangeLog: Follow spelling conventions.
* ChangeLog.2: Likewise.
* call.c: Likewise.
* class.c: Likewise.
* cp-tree.h: Likewise.
* cvt.c: Likewise.
* decl.c: Likewise.
* decl2.c: Likewise.
* except.c: Likewise.
* friend.c: Likewise.
* g++spec.c: Likewise.
* init.c: Likewise.
* lex.c: Likewise.
* mangle.c: Likewise.
* method.c: Likewise.
* operators.def: Likewise.
* optimize.c: Likewise.
* pt.c: Likewise.
* rtti.c: Likewise.
* search.c: Likewise.
* semantics.c: Likewise.
* spew.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
From-SVN: r57387
|
|
* error.c: Fix comment formatting.
* except.c: Likewise.
* expr.c: Likewise.
* friend.c: Likewise.
* g++spec.c: Likewise.
* init.c: Likewise.
* lex.c: Likewise.
* mangle.c: Likewise.
* method.c: Likewise.
* optimize.c: Likewise.
* pt.c: Likewise.
* rtti.c: Likewise.
* search.c: Likewise.
* semantics.c: Likewise.
* spew.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
* typeck2.c: Likewise.
From-SVN: r57138
|
|
* call.c (build_vfield_ref): Do not go through build_component_ref.
(build_field_call): Use build_class_member_access_expr.
(build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
(build_object_call): Likewise.
* class.c (convert_to_base): New function.
(type_requires_array_cookie): Use BASELINK_FUNCTIONS.
(instantiate_type): Handle BASELINKs.
* cp-tree.def (BASELINK): New tree code.
* cp-tree.h (BASELINK_P): Reimplement.
(SET_BASELINK_P): Remove.
(BASELINK_BINFO): Reimplement.
(BASELINK_FUNCTIONS): Likewise.
(BASELINK_ACCESS_BINFO): Likewise.
(BASELINK_OPTYPE): Likewise.
(convert_to_base): New function.
(name_p): Likewise.
(build_object_ref): Remove.
(build_component_ref_1): Likewise.
(build_component_ref): Likewise.
(build_x_component_ref): Likewise.
(build_class_member_access_expr): New function.
(finish_class_member_access_expr): Likewise.
(build_ptrmemfunc_access_expr): Likewise.
* decl.c (grokdeclarator): Handle BASELINKs.
* decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
finish_class_member_access_expr.
(arg_assoc): Handle BASELINKs.
(do_class_using_decl): Likewise.
* error.c (dump_decl): Likewise.
(dump_expr): Use build_ptrmemfunc_access_expr.
* except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
destructors.
(build_throw): Use BASELINK_FUNCTIONS.
* init.c (perform_member_init): Use
build_class_member_access_expr.
(build_offset_ref): Handle BASELINKs. Use
build_class_member_access_expr.
* method.c (hack_identifier): Likewise.
* parse.y (do_id): Use BASELINK, not TREE_LIST.
(primary): Remove uses of build_object_ref.
* pt.c (lookup_template_function): Handle BASELINKs.
(resolve_overloaded_unification): Likewise.
* search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
(lookup_field): Use BASELINK, not TREE_LIST.
(lookup_fnfiels): Likewise.
(setup_class_bindings): Likewise.
* semantics.c (finish_object_call_expr): Do not use
build_method_call when we already know what function is being
called.
* spew.c (identifier_type): Use BASELINK, not TREE_LIST.
* tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
TREE_CHAIN.
(name_p): New function.
* typeck.c (build_object_ref): Remove.
(build_component_ref_1): Likewise.
(build_x_component_ref): Likewise.
(build_class_member_access_expr): New function.
(finish_class_member_access_expr): Likewise.
(build_ptrmemfunc_access_expr): Likewise.
(get_member_function_from_ptrfunc): Use
build_ptrmemfunc_access_expr.
(build_binary_op): Likewise.
(build_unary_op): Likewise.
(build_ptrmemfunc): Likewise.
(pfn_from_ptrmemfunc): Likewise.
* typeck2.c (build_m_component_ref): Adjust comment.
* g++.dg/abi/offsetof.C: Tweak error messages.
* g++.old-deja/g++.mike/p10769a.C: Likewise.
From-SVN: r56117
|
|
2002-08-05 Geoffrey Keating <geoffk@redhat.com>
* attribs.c: Don't include obstack.h.
* builtins.c: Likewise.
* cfganal.c: Likewise.
* cfgbuild.c: Likewise.
* cfgcleanup.c: Likewise.
* emit-rtl.c: Likewise.
* loop.c: Likewise.
* stmt.c: Likewise.
Index: cp/ChangeLog
2002-08-05 Geoffrey Keating <geoffk@redhat.com>
* class.c: Don't include obstack.h.
(popclass):
* decl2.c: Delete bogus comment.
* error.c: Don't include obstack.h.
* except.c: Likewise.
(dump_type): Correct comment.
* method.c: Don't include obstack.h.
* tree.c: Likewise.
Index: java/ChangeLog
2002-08-05 Geoffrey Keating <geoffk@redhat.com>
* mangle_name.c: Don't include obstack.h twice.
* xref.c: Don't include obstack.h.
From-SVN: r56055
|
|
* call.c (build_field_call): Do not look up the field by name.
(build_method_call): Simplify.
(struct z_candidate): Add access_path and conversion_path. Remove
basetype_path.
(convert_class_to_reference): Adjust use of
add_function_candidate.
(add_candidate): Add conversion_path argument.
(add_function_candidate): Use it.
(add_conv_dndidate): Likewise.
(build_builtin_candidate): Likewise.
(add_template_candidate_real): Add conversion_path argument.
(add_template_conv_candidate): Likewise.
(add_template_candidate): Likewise.
(build_user_type_conversion_1): Use it.
(build_new_function_call): Remove name lookup code. Adjust use of
add_template_candidate and add_function_candidate.
(build_new_op): Likewise.
(convert_like_real): Use build_special_member_call.
(build_over_call): Use cand->conversion_path.
(build_special_member_call): New method.
(build_new_method_call): Remove name lookup code.
* cp-tree.def (OFFSET_REF): Update documentation.
(TEMPLATE_ID_EXPR): Likewise.
* cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
(BASELINK_OPTYPE): Likewise.
(build_new_method_call): Adjust prototype.
(build_special_member_call): New method.
(build_baselink): New method.
(build_offset_ref_call_from_tree): Likewise.
(build_call_from_tree): Likewise.
(finish_qualified_call_expr): Remove.
(finish_call_expr): Adjust prototype.
(build_x_function_call): Remove.
* cvt.c (ocp_convert): Use build_special_member_call.
* decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
(build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
CALL_EXPR.
(build_offset_ref_call_from_tree): New function.
(build_call_from_tree): Likewise.
* init.c (expand_cleanup): Use build_special_member_call.
(expand_default_init): Likewise.
(build_member_call): Use finish_call_expr.
(build_new_1): Use build_special_member_call.
(push_base_cleanups): Likewise.
* method.c (do_build_assign_ref): Likewise.
* parse.y (template_id): Do not pass a COMPONENT_REF to
lookup_template_function.
(primary): Use parse_finish_call_epxr, not finish_call_expr.
(parse_finish_call_expr): New function.
* pt.c (lookup_template_function): Add assertions.
* search.c (lookup_base): Allow T to be a binfo.
(build_baselink): New function.
(lookup_member): Use it.
* semantics.c (finish_call_expr): Do not do name lookup.
(finish_object_call_expr): Remove #if 0'd code.
(finish_qualified_call_expr): Remove.
* typeck.c (build_x_function_call): Remove.
(build_static_case): Use build_special_member_call.
* typeck2.c (build_functional_cast): Likewise.
* g++.dg/inherit/operator1.C: New test.
* g++.dg/lookup/disamb1.C: Fix typo in comment.
* g++.dg/other/error1.C: Change expected error message.
* g++.dg/template/conv4.C: Likewise.
From-SVN: r55920
|
|
* defaults.h (obstack_chunk_alloc, obstack_chunk_free):
Default definition.
* gcse.c: Don't define obstack_chunk_free.
* collect2.c, conflict.c, df.c, diagnostic.c, fix-header.c,
flow.c, gcc.c, genattrtab.c, genautomata.c, genflags.c, gensupport.c,
integrate.c, loop.c, ra.c, read-rtl.c, regrename.c, reload1.c,
reorg.c, tlink.c, tree.c, config/arm/arm.c, objc/objc-act.c:
Don't define obstack macros.
cp:
* class.c, method.c, pt.c, search.c: Similarly.
From-SVN: r55665
|
|
PR c++/6492
* pt.c (tsubst_friend_class): If the friend has an explicit scope,
enter that scope before name lookup.
PR c++/6486
* method.c (do_build_copy_constructor): Avoid building
cv-qualified reference types.
PR c++/6486
* g++.dg/template/friend6.C: New test.
PR c++/6492
* g++.dg/init/copy1.C: New test.
From-SVN: r52895
|
|
PR bootstrap/6445
* config/i386/i386.md (untyped_call): Return the value in a float
register if TARGET_FLOAT_RETURNS_IN_80387, not just if
TARGET_80387.
PR c++/6497
* method.c (do_build_assign_ref): Pass a derivation to
build_method_call when calling base class assignment operators.
PR c++/6497
* g++.dg/inherit/access2.C: New test.
PR bootstrap/6445
* gcc.dg/20020426-1.c: New test.
From-SVN: r52809
|
|
PR c++/6331
* method.c (do_build_copy_constructor): Use cp_build_qualified_type.
* typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
From-SVN: r52709
|