aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 76a6019..a215aa7 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -18575,7 +18575,7 @@ resolve_overloaded_unification (tree tparms,
lvalue for the function template specialization. */
tree
-resolve_nondeduced_context (tree orig_expr)
+resolve_nondeduced_context (tree orig_expr, tsubst_flags_t complain)
{
tree expr, offset, baselink;
bool addr;
@@ -18658,16 +18658,16 @@ resolve_nondeduced_context (tree orig_expr)
{
tree base
= TYPE_MAIN_VARIANT (TREE_TYPE (TREE_OPERAND (offset, 0)));
- expr = build_offset_ref (base, expr, addr, tf_warning_or_error);
+ expr = build_offset_ref (base, expr, addr, complain);
}
if (addr)
- expr = cp_build_addr_expr (expr, tf_warning_or_error);
+ expr = cp_build_addr_expr (expr, complain);
return expr;
}
- else if (good == 0 && badargs)
+ else if (good == 0 && badargs && (complain & tf_error))
/* There were no good options and at least one bad one, so let the
user know what the problem is. */
- instantiate_template (badfn, badargs, tf_warning_or_error);
+ instantiate_template (badfn, badargs, complain);
}
return orig_expr;
}
@@ -23880,7 +23880,7 @@ do_auto_deduction (tree type, tree init, tree auto_node,
if (type == error_mark_node)
return error_mark_node;
- init = resolve_nondeduced_context (init);
+ init = resolve_nondeduced_context (init, complain);
if (AUTO_IS_DECLTYPE (auto_node))
{