Commit 41f5d4b1 by Nathan Sidwell Committed by Nathan Sidwell

call.c (build_user_type_conversion_1): Use my_friendly_assert rather than if ...

cp:
	* call.c (build_user_type_conversion_1): Use my_friendly_assert
	rather than if ... abort.
	* cvt.c (convert_to_reference): Likewise.
	* semantics.c (setup_vtbl_ptr): Likewise.
	* pt.c (lookup_template_class): Comment typo.

From-SVN: r48371
parent f3368a90
2001-12-29 Nathan Sidwell <nathan@codesourcery.com> 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
* call.c (build_user_type_conversion_1): Use my_friendly_assert
rather than if ... abort.
* cvt.c (convert_to_reference): Likewise.
* semantics.c (setup_vtbl_ptr): Likewise.
* pt.c (lookup_template_class): Comment typo.
2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
PR c++/5125 PR c++/5125
* pt.c (push_template_decl_real): Make sure DECL has * pt.c (push_template_decl_real): Make sure DECL has
DECL_LANG_SPECIFIC. DECL_LANG_SPECIFIC.
......
...@@ -2376,9 +2376,8 @@ build_user_type_conversion_1 (totype, expr, flags) ...@@ -2376,9 +2376,8 @@ build_user_type_conversion_1 (totype, expr, flags)
/* We represent conversion within a hierarchy using RVALUE_CONV and /* We represent conversion within a hierarchy using RVALUE_CONV and
BASE_CONV, as specified by [over.best.ics]; these become plain BASE_CONV, as specified by [over.best.ics]; these become plain
constructor calls, as specified in [dcl.init]. */ constructor calls, as specified in [dcl.init]. */
if (IS_AGGR_TYPE (fromtype) && IS_AGGR_TYPE (totype) my_friendly_assert (!IS_AGGR_TYPE (fromtype) || !IS_AGGR_TYPE (totype)
&& DERIVED_FROM_P (totype, fromtype)) || !DERIVED_FROM_P (totype, fromtype), 20011226);
abort ();
if (IS_AGGR_TYPE (totype)) if (IS_AGGR_TYPE (totype))
ctors = lookup_fnfields (TYPE_BINFO (totype), ctors = lookup_fnfields (TYPE_BINFO (totype),
...@@ -2400,11 +2399,11 @@ build_user_type_conversion_1 (totype, expr, flags) ...@@ -2400,11 +2399,11 @@ build_user_type_conversion_1 (totype, expr, flags)
t = build_int_2 (0, 0); t = build_int_2 (0, 0);
TREE_TYPE (t) = build_pointer_type (totype); TREE_TYPE (t) = build_pointer_type (totype);
args = build_tree_list (NULL_TREE, expr); args = build_tree_list (NULL_TREE, expr);
if (DECL_HAS_IN_CHARGE_PARM_P (OVL_CURRENT (ctors)) /* We should never try to call the abstract or base constructor
|| DECL_HAS_VTT_PARM_P (OVL_CURRENT (ctors))) from here. */
/* We should never try to call the abstract or base constructor my_friendly_assert (!DECL_HAS_IN_CHARGE_PARM_P (OVL_CURRENT (ctors))
from here. */ && !DECL_HAS_VTT_PARM_P (OVL_CURRENT (ctors)),
abort (); 20011226);
args = tree_cons (NULL_TREE, t, args); args = tree_cons (NULL_TREE, t, args);
} }
for (; ctors; ctors = OVL_NEXT (ctors)) for (; ctors; ctors = OVL_NEXT (ctors))
......
...@@ -485,8 +485,7 @@ convert_to_reference (reftype, expr, convtype, flags, decl) ...@@ -485,8 +485,7 @@ convert_to_reference (reftype, expr, convtype, flags, decl)
intype = TREE_TYPE (expr); intype = TREE_TYPE (expr);
} }
if (TREE_CODE (intype) == REFERENCE_TYPE) my_friendly_assert (TREE_CODE (intype) != REFERENCE_TYPE, 364);
my_friendly_abort (364);
intype = TYPE_MAIN_VARIANT (intype); intype = TYPE_MAIN_VARIANT (intype);
......
...@@ -3982,7 +3982,7 @@ lookup_template_class (d1, arglist, in_decl, context, entering_scope, complain) ...@@ -3982,7 +3982,7 @@ lookup_template_class (d1, arglist, in_decl, context, entering_scope, complain)
arg_depth = TMPL_ARGS_DEPTH (arglist); arg_depth = TMPL_ARGS_DEPTH (arglist);
} }
/* Now we should enough arguments. */ /* Now we should have enough arguments. */
my_friendly_assert (parm_depth == arg_depth, 0); my_friendly_assert (parm_depth == arg_depth, 0);
/* From here on, we're only interested in the most general /* From here on, we're only interested in the most general
......
...@@ -1157,10 +1157,7 @@ setup_vtbl_ptr (member_init_list, base_init_list) ...@@ -1157,10 +1157,7 @@ setup_vtbl_ptr (member_init_list, base_init_list)
tree base_init_list; tree base_init_list;
{ {
my_friendly_assert (doing_semantic_analysis_p (), 19990919); my_friendly_assert (doing_semantic_analysis_p (), 19990919);
my_friendly_assert (!vtbls_set_up_p, 20011220);
/* If we've already done this, break. */
if (vtbls_set_up_p)
abort ();
if (processing_template_decl) if (processing_template_decl)
add_stmt (build_min_nt (CTOR_INITIALIZER, add_stmt (build_min_nt (CTOR_INITIALIZER,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment