diff options
| author | Nathan Sidwell <nathan@codesourcery.com> | 2004-08-30 15:28:48 +0000 |
|---|---|---|
| committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-08-30 15:28:48 +0000 |
| commit | 8dc2b10365a3d9def1a6e0412db0cc0177cfad6d (patch) | |
| tree | 4ca6b4e112f696c8ceed5ba25d4dd59e1b129aba /gcc/cp/cp-lang.c | |
| parent | e7023b0f5d50726613a97706f2de34e856eb1ec8 (diff) | |
| download | gcc-8dc2b10365a3d9def1a6e0412db0cc0177cfad6d.zip gcc-8dc2b10365a3d9def1a6e0412db0cc0177cfad6d.tar.gz gcc-8dc2b10365a3d9def1a6e0412db0cc0177cfad6d.tar.bz2 | |
call.c (check_dtor_name): Replace abort with gcc_assert or gcc_unreachable.
* call.c (check_dtor_name): Replace abort with gcc_assert or
gcc_unreachable.
(build_call, add_builtin_candidate, build_new_op,
convert_like_real, build_over_call, in_charge_arg_for_name,
source_type, joust): Likewise.
* class.c (build_simple_base_path, get_vcall_index,
finish_struct_1, instantiate_type, get_enclosing_class,
add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
* cp-gimplify.c (cp_genericize): Likewise.
* cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
* cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
* decl.c (poplevel, make_unbound_class_template, reshape_init,
check_special_function_return_type, grokdeclarator,
grok_op_properties, tag_name, xref_tag, start_preparsed_function,
finish_function): Likewise.
* decl2.c (grokfield, maybe_emit_vtables):Likewise.
* error.c (dump_global_iord, dump_decl, dump_template_decl,
language_to_string): Likewise.
* except.c (choose_personality_routine): Likewise.
* friend.c (do_friend): Likewise.
* g++spec.c (lang_specific_driver): Likewise.
* init.c (build_zero_init, expand_default_init, build_new_1,
build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
* lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
* mangle.c (add_substitution, write_unscoped_name,
write_template_prefix, write_identifier,
write_special_name_destructor, write_type, write_builtin_type,
write_expression, write_template_param,
write_java_integer_type_codes): Likewise.
* method.c (implicitly_declare_fn): Likewise.
From-SVN: r86778
Diffstat (limited to 'gcc/cp/cp-lang.c')
| -rw-r--r-- | gcc/cp/cp-lang.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/cp/cp-lang.c b/gcc/cp/cp-lang.c index 00ba81c..a1359cd 100644 --- a/gcc/cp/cp-lang.c +++ b/gcc/cp/cp-lang.c @@ -260,13 +260,13 @@ cp_expr_size (tree exp) /* The backend should not be interested in the size of an expression of a type with both of these set; all copies of such types must go through a constructor or assignment op. */ - if (TYPE_HAS_COMPLEX_INIT_REF (TREE_TYPE (exp)) - && TYPE_HAS_COMPLEX_ASSIGN_REF (TREE_TYPE (exp)) - /* But storing a CONSTRUCTOR isn't a copy. */ - && TREE_CODE (exp) != CONSTRUCTOR) - abort (); + gcc_assert (!TYPE_HAS_COMPLEX_INIT_REF (TREE_TYPE (exp)) + || !TYPE_HAS_COMPLEX_ASSIGN_REF (TREE_TYPE (exp)) + /* But storing a CONSTRUCTOR isn't a copy. */ + || TREE_CODE (exp) == CONSTRUCTOR); + /* This would be wrong for a type with virtual bases, but they are - caught by the abort above. */ + caught by the assert above. */ return (is_empty_class (TREE_TYPE (exp)) ? size_zero_node : CLASSTYPE_SIZE_UNIT (TREE_TYPE (exp))); @@ -289,7 +289,7 @@ cp_tree_size (enum tree_code code) case DEFAULT_ARG: return sizeof (struct tree_default_arg); case OVERLOAD: return sizeof (struct tree_overload); default: - abort (); + gcc_unreachable (); } /* NOTREACHED */ } |
