tree ret;
auto_cond_timevar tv (TV_OVERLOAD);
+
+ conversion_obstack_sentinel cos;
+
cand = build_user_type_conversion_1 (totype, expr, flags, complain);
if (cand)
int flags, tsubst_flags_t complain)
{
conversion *conv;
- void *p;
tree t;
location_t loc = cp_expr_loc_or_input_loc (expr);
if (error_operand_p (expr))
return error_mark_node;
- /* Get the high-water mark for the CONVERSION_OBSTACK. */
- p = conversion_obstack_alloc (0);
+ conversion_obstack_sentinel cos;
conv = implicit_conversion (type, TREE_TYPE (expr), expr,
/*c_cast_p=*/false, flags, complain);
expr = error_mark_node;
}
- /* Free all the conversions we allocated. */
- obstack_free (&conversion_obstack, p);
-
return expr;
}
gcc_assert (deduction_guide_p (OVL_FIRST (dguides)));
- /* Get the high-water mark for the CONVERSION_OBSTACK. */
- void *p = conversion_obstack_alloc (0);
+ conversion_obstack_sentinel cos;
z_candidate *cand = perform_overload_resolution (dguides, args, &candidates,
&any_viable_p, complain);
else
result = cand->fn;
- /* Free all the conversions we allocated. */
- obstack_free (&conversion_obstack, p);
-
return result;
}
{
struct z_candidate *candidates, *cand;
bool any_viable_p;
- void *p;
tree result;
if (args != NULL && *args != NULL)
if (flag_tm)
tm_malloc_replacement (fn);
- /* Get the high-water mark for the CONVERSION_OBSTACK. */
- p = conversion_obstack_alloc (0);
+ conversion_obstack_sentinel cos;
cand = perform_overload_resolution (fn, *args, &candidates, &any_viable_p,
complain);
== BUILT_IN_NORMAL)
result = coro_validate_builtin_call (result);
- /* Free all the conversions we allocated. */
- obstack_free (&conversion_obstack, p);
-
return result;
}
if (*args == NULL)
return error_mark_node;
+ conversion_obstack_sentinel cos;
+
/* Based on:
[expr.new]
tree fns, convs, first_mem_arg = NULL_TREE;
bool any_viable_p;
tree result = NULL_TREE;
- void *p;
auto_cond_timevar tv (TV_OVERLOAD);
return error_mark_node;
}
- /* Get the high-water mark for the CONVERSION_OBSTACK. */
- p = conversion_obstack_alloc (0);
+ conversion_obstack_sentinel cos;
if (fns)
{
}
}
- /* Free all the conversions we allocated. */
- obstack_free (&conversion_obstack, p);
-
return result;
}
bool is_glvalue = true;
struct z_candidate *candidates = 0;
struct z_candidate *cand;
- void *p;
tree orig_arg2, orig_arg3;
auto_cond_timevar tv (TV_OVERLOAD);
|| error_operand_p (arg3))
return error_mark_node;
+ conversion_obstack_sentinel cos;
+
orig_arg2 = arg2;
orig_arg3 = arg3;
conversion *conv3;
bool converted = false;
- /* Get the high-water mark for the CONVERSION_OBSTACK. */
- p = conversion_obstack_alloc (0);
-
conv2 = conditional_conversion (arg2, arg3, complain);
conv3 = conditional_conversion (arg3, arg2, complain);
converted = true;
}
- /* Free all the conversions we allocated. */
- obstack_free (&conversion_obstack, p);
-
if (result)
return result;
enum tree_code code2 = ERROR_MARK;
enum tree_code code_orig_arg1 = ERROR_MARK;
enum tree_code code_orig_arg2 = ERROR_MARK;
- void *p;
bool strict_p;
bool any_viable_p;
|| error_operand_p (arg3))
return error_mark_node;
+ conversion_obstack_sentinel cos;
+
bool ismodop = code == MODIFY_EXPR;
if (ismodop)
{
if (arg3 != NULL_TREE)
arglist->quick_push (arg3);
- /* Get the high-water mark for the CONVERSION_OBSTACK. */
- p = conversion_obstack_alloc (0);
-
result = add_operator_candidates (&candidates, code, code2, arglist,
lookups, flags, complain);
if (result == error_mark_node)
- goto user_defined_result_ready;
+ return error_mark_node;
switch (code)
{
}
}
- user_defined_result_ready:
-
- /* Free all the conversions we allocated. */
- obstack_free (&conversion_obstack, p);
-
if (result || result_valid_p)
return result;
tree fns, first_mem_arg = NULL_TREE;
bool any_viable_p;
tree result = NULL_TREE;
- void *p;
auto_cond_timevar tv (TV_OVERLOAD);
return error_mark_node;
}
- /* Get the high-water mark for the CONVERSION_OBSTACK. */
- p = conversion_obstack_alloc (0);
+ conversion_obstack_sentinel cos;
if (fns)
{
gcc_unreachable ();
}
- /* Free all the conversions we allocated. */
- obstack_free (&conversion_obstack, p);
-
return result;
}
{
gcc_assert (TYPE_REF_P (type));
- /* Get the high-water mark for the CONVERSION_OBSTACK. */
- void *p = conversion_obstack_alloc (0);
+ conversion_obstack_sentinel cos;
const int flags = direct_init_p ? LOOKUP_NORMAL : LOOKUP_IMPLICIT;
conversion *conv = implicit_conversion (type, TREE_TYPE (expr), expr,
if (conv && !conv->bad_p)
ret = tristate (conv_binds_ref_to_temporary (conv));
- /* Free all the conversions we allocated. */
- obstack_free (&conversion_obstack, p);
-
return ret;
}
tree orig_instance;
tree orig_fns;
vec<tree, va_gc> *orig_args = NULL;
- void *p;
auto_cond_timevar tv (TV_OVERLOAD);
else
first_mem_arg = maybe_resolve_dummy (instance, false);
- /* Get the high-water mark for the CONVERSION_OBSTACK. */
- p = conversion_obstack_alloc (0);
+ conversion_obstack_sentinel cos;
/* The number of arguments artificial parms in ARGS; we subtract one because
there's no 'this' in ARGS. */
call = build_nop (void_type_node, call);
}
- /* Free all the conversions we allocated. */
- obstack_free (&conversion_obstack, p);
-
if (orig_args != NULL)
release_tree_vector (orig_args);
tsubst_flags_t complain)
{
conversion *t;
- void *p;
bool ok_p;
- /* Get the high-water mark for the CONVERSION_OBSTACK. */
- p = conversion_obstack_alloc (0);
+ conversion_obstack_sentinel cos;
/* We want to discard any access checks done for this test,
as we might not be in the appropriate access context and
we'll do the check again when we actually perform the
/* Discard the access checks now. */
pop_deferring_access_checks ();
- /* Free all the conversions we allocated. */
- obstack_free (&conversion_obstack, p);
return ok_p;
}
tsubst_flags_t complain)
{
conversion *t;
- void *p;
- /* Get the high-water mark for the CONVERSION_OBSTACK. */
- p = conversion_obstack_alloc (0);
+ conversion_obstack_sentinel cos;
/* Try to perform the conversion. */
t = implicit_conversion (to, from, arg, /*c_cast_p=*/false,
flags, complain);
- /* Free all the conversions we allocated. */
- obstack_free (&conversion_obstack, p);
return t != NULL;
}
tsubst_flags_t complain, int flags)
{
conversion *conv;
- void *p;
location_t loc = cp_expr_loc_or_input_loc (expr);
if (TYPE_REF_P (type))
if (error_operand_p (expr))
return error_mark_node;
- /* Get the high-water mark for the CONVERSION_OBSTACK. */
- p = conversion_obstack_alloc (0);
+ conversion_obstack_sentinel cos;
conv = implicit_conversion (type, TREE_TYPE (expr), expr,
/*c_cast_p=*/false,
expr = convert_like (conv, expr, complain);
}
- /* Free all the conversions we allocated. */
- obstack_free (&conversion_obstack, p);
-
return expr;
}
tsubst_flags_t complain)
{
conversion *conv;
- void *p;
if (type == error_mark_node || error_operand_p (expr))
return error_mark_node;
return build_cplus_new (type, expr, complain);
}
- /* Get the high-water mark for the CONVERSION_OBSTACK. */
- p = conversion_obstack_alloc (0);
+ conversion_obstack_sentinel cos;
conv = implicit_conversion (type, TREE_TYPE (expr), expr,
c_cast_p,
/*issue_conversion_warnings=*/false,
c_cast_p, /*nested_p=*/false, complain);
- /* Free all the conversions we allocated. */
- obstack_free (&conversion_obstack, p);
-
return expr;
}
int flags, tsubst_flags_t complain)
{
conversion *conv;
- void *p;
location_t loc = cp_expr_loc_or_input_loc (expr);
if (type == error_mark_node || error_operand_p (expr))
return error_mark_node;
- /* Get the high-water mark for the CONVERSION_OBSTACK. */
- p = conversion_obstack_alloc (0);
+ conversion_obstack_sentinel cos;
conv = reference_binding (type, TREE_TYPE (expr), expr, /*c_cast_p=*/false,
flags, complain);
else
gcc_unreachable ();
- /* Free all the conversions we allocated. */
- obstack_free (&conversion_obstack, p);
-
return expr;
}