diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2004-08-27 17:59:33 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-08-27 17:59:33 +0000 |
commit | 50bc768da122bde65bc31bf4054f29603893455a (patch) | |
tree | 799c8fedd2cb98c51cb9c5f72999b3cc368ee8ca /gcc/cp/init.c | |
parent | e3861d2a1b0dc8389f5261b78adf4eb621b74251 (diff) | |
download | gcc-50bc768da122bde65bc31bf4054f29603893455a.zip gcc-50bc768da122bde65bc31bf4054f29603893455a.tar.gz gcc-50bc768da122bde65bc31bf4054f29603893455a.tar.bz2 |
call.c (validate_conversion_obstack): Replace my_friendly_assert with gcc_assert or gcc_unreachable.
* call.c (validate_conversion_obstack): Replace
my_friendly_assert with gcc_assert or gcc_unreachable.
(direct_reference_binding, merge_conversion_sequences,
build_user_type_conversion_1, perform_overload_resolution,
build_op_delete_call, enforce_access, call_builtin_trap,
build_over_call, build_special_member_call, build_new_method_call,
initialize_reference): Likewise.
* class.c (build_base_path, build_primary_vtable, alter_access,
check_bases, update_vtable_entry_for_fn, layout_empty_base,
clone_function_decl, adjust_clone_args,
type_requires_array_cookie, include_empty_classes,
finish_struct_1, resolve_address_of_overloaded_function,
instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
accumulate_vtbl_inits, build_vtbl_initializer,
build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
* cvt.c (build_up_reference, convert_to_reference): Likewise.
* decl.c (poplevel, duplicate_decls, make_typename_type,
cxx_init_decl_processing, reshape_init, check_initializer,
make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
xref_basetypes, start_preparsed_function, save_function_data,
finish_function, finish_method, maybe_register_incomplete_var,
complete_vars): Likewise.
* decl2.c (grok_array_decl, check_member_template,
check_classfn, finish_static_data_member_decl, coerce_new_type,
coerce_delete_type, import_export_class, decl_needed_p,
determine_visibility, import_export_decl, build_cleanup,
start_static_initialization_or_destructi, do_static_destruction,
prune_vars_needing_no_initialization,
build_offset_ref_call_from_tree): Likewise.
* error.c (dump_decl, dump_expr): Likewise.
* init.c (finish_init_stmts, build_zero_init,
expand_virtual_init, expand_default_init, expand_aggr_init_1,
build_offset_ref, build_new_1, build_delete, build_vbase_delete):
Likewise.
* mangle.c (write_method_parms, write_template_args,
write_expression, write_template_arg): Likewise.
* method.c (make_thunk, finish_thunk, use_thunk): Likewise.
* name-lookup.c (pop_binding, begin_scope, leave_scope,
resume_scope, push_using_decl, validate_nonmember_using_decl,
is_ancestor, poplevel_class, set_inherited_value_binding_p,
push_class_level_binding, do_class_using_decl, push_namespace,
pop_namespace, add_using_namespace, ambiguous_decl,
lookup_namespace_name, lookup_type_current_level,
maybe_process_template_type_declaration): Likewise.
* parser.c (cp_lexer_peek_nth_token,
cp_parser_parse_and_diagnose_invalid_typ,
cp_parser_translation_unit, cp_parser_template_id,
cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
* pt.c (push_access_scope, finish_member_template_decl,
push_inline_template_parms_recursive, add_outermost_template_args,
get_innermost_template_args, begin_explicit_instantiation,
end_explicit_instantiation, retrieve_specialization,
is_specialization_of, is_specialization_of_friend,
register_specialization, check_explicit_specialization,
comp_template_parms, process_template_parm,
process_partial_specialization, convert_nontype_argument,
coerce_template_template_parms, coerce_template_parms,
mangle_class_name_for_template, lookup_template_function,
lookup_template_class, instantiate_class_template, tsubst_decl,
tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
instantiate_template, fn_type_unification, type_unification_real,
get_template_base, regenerate_decl_from_template,
template_for_substitution, instantiate_decl,
get_mostly_instantiated_function_type, dependent_scope_ref_p,
value_dependent_expression_p, resolve_typename_type): Likewise.
* repo.c (repo_emit_p): Likewise.
* rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
create_tinfo_types, emit_tinfo_decl): Likewise.
* search.c (lookup_base_r, lookup_base, lookup_field_1,
dfs_access_in_type, build_baselink, lookup_member,
adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
* semantics.c (perform_or_defer_access_check,
finish_non_static_data_member, finish_stmt_expr_expr,
finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
finish_template_template_parm, finish_member_declaration,
emit_associated_thunks): Likewise.
* tree.c (build_target_expr_with_type, force_target_expr,
copy_binfo, get_first_fn, cp_tree_equal): Likewise.
* typeck.c (type_after_usual_arithmetic_conversions, comptypes,
cxx_sizeof_or_alignof_type, perform_integral_promotions,
build_class_member_access_expr, finish_class_member_access_expr,
build_ptrmemfunc_access_expr, build_unary_op,
unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
* typeck2.c (complete_type_check_abstract,
abstract_virtuals_error, process_init_constructor,
add_exception_specifier): Likewise.
From-SVN: r86669
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r-- | gcc/cp/init.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 3263f6e..1f172d2 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -87,7 +87,7 @@ finish_init_stmts (bool is_global, tree stmt_expr, tree compound_stmt) stmt_expr = finish_stmt_expr (stmt_expr, true); - my_friendly_assert (!building_stmt_tree () == is_global, 20030726); + gcc_assert (!building_stmt_tree () == is_global); return stmt_expr; } @@ -171,8 +171,7 @@ build_zero_init (tree type, tree nelts, bool static_storage_p) -- if T is a reference type, no initialization is performed. */ - my_friendly_assert (nelts == NULL_TREE || TREE_CODE (nelts) == INTEGER_CST, - 20030618); + gcc_assert (nelts == NULL_TREE || TREE_CODE (nelts) == INTEGER_CST); if (type == error_mark_node) ; @@ -226,7 +225,7 @@ build_zero_init (tree type, tree nelts, bool static_storage_p) /* Iterate over the array elements, building initializations. */ inits = NULL_TREE; max_index = nelts ? nelts : array_type_nelts (type); - my_friendly_assert (TREE_CODE (max_index) == INTEGER_CST, 20030618); + gcc_assert (TREE_CODE (max_index) == INTEGER_CST); /* A zero-sized array, which is accepted as an extension, will have an upper bound of -1. */ @@ -787,7 +786,7 @@ expand_virtual_init (tree binfo, tree decl) /* Compute the location of the vtpr. */ vtbl_ptr = build_vfield_ref (build_indirect_ref (decl, NULL), TREE_TYPE (binfo)); - my_friendly_assert (vtbl_ptr != error_mark_node, 20010730); + gcc_assert (vtbl_ptr != error_mark_node); /* Assign the vtable to the vptr. */ vtbl = convert_force (TREE_TYPE (vtbl_ptr), vtbl, 0); @@ -1180,7 +1179,7 @@ expand_default_init (tree binfo, tree true_exp, tree exp, tree init, int flags) else if (BRACE_ENCLOSED_INITIALIZER_P (init)) { /* A brace-enclosed initializer for an aggregate. */ - my_friendly_assert (CP_AGGREGATE_TYPE_P (type), 20021016); + gcc_assert (CP_AGGREGATE_TYPE_P (type)); init = digest_init (type, init, (tree *)NULL); } else @@ -1248,8 +1247,8 @@ expand_aggr_init_1 (tree binfo, tree true_exp, tree exp, tree init, int flags) { tree type = TREE_TYPE (exp); - my_friendly_assert (init != error_mark_node && type != error_mark_node, 211); - my_friendly_assert (building_stmt_tree (), 20021010); + gcc_assert (init != error_mark_node && type != error_mark_node); + gcc_assert (building_stmt_tree ()); /* Use a function returning the desired type to initialize EXP for us. If the function is a constructor, and its first argument is @@ -1351,7 +1350,7 @@ build_offset_ref (tree type, tree name, bool address_p) name = DECL_NAME (OVL_CURRENT (name)); } - my_friendly_assert (TREE_CODE (name) == IDENTIFIER_NODE, 0); + gcc_assert (TREE_CODE (name) == IDENTIFIER_NODE); } if (type == NULL_TREE) @@ -1953,7 +1952,7 @@ build_new_1 (tree exp) while (TREE_CODE (alloc_call) == COMPOUND_EXPR) alloc_call = TREE_OPERAND (alloc_call, 1); alloc_fn = get_callee_fndecl (alloc_call); - my_friendly_assert (alloc_fn != NULL_TREE, 20020325); + gcc_assert (alloc_fn != NULL_TREE); /* Now, check to see if this function is actually a placement allocation function. This can happen even when PLACEMENT is NULL @@ -2769,7 +2768,7 @@ build_delete (tree type, tree addr, special_function_kind auto_delete, addr = convert_force (build_pointer_type (type), addr, 0); } - my_friendly_assert (IS_AGGR_TYPE (type), 220); + gcc_assert (IS_AGGR_TYPE (type)); if (TYPE_HAS_TRIVIAL_DESTRUCTOR (type)) { @@ -2785,7 +2784,7 @@ build_delete (tree type, tree addr, special_function_kind auto_delete, tree do_delete = NULL_TREE; tree ifexp; - my_friendly_assert (TYPE_HAS_DESTRUCTOR (type), 20011213); + gcc_assert (TYPE_HAS_DESTRUCTOR (type)); /* For `::delete x', we must not use the deleting destructor since then we would not be sure to get the global `operator @@ -2935,7 +2934,7 @@ build_vbase_delete (tree type, tree decl) VEC (tree) *vbases; tree addr = build_unary_op (ADDR_EXPR, decl, 0); - my_friendly_assert (addr != error_mark_node, 222); + gcc_assert (addr != error_mark_node); result = convert_to_void (integer_zero_node, NULL); for (vbases = CLASSTYPE_VBASECLASSES (type), ix = 0; |