diff options
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 02e08e3..a7ca50d 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -1953,7 +1953,8 @@ empty_expr_stmt_p (tree expr_stmt) Returns the functions to be considered by overload resolution. */ tree -perform_koenig_lookup (tree fn, VEC(tree,gc) *args, bool include_std) +perform_koenig_lookup (tree fn, VEC(tree,gc) *args, bool include_std, + tsubst_flags_t complain) { tree identifier = NULL_TREE; tree functions = NULL_TREE; @@ -1991,8 +1992,13 @@ perform_koenig_lookup (tree fn, VEC(tree,gc) *args, bool include_std) { fn = lookup_arg_dependent (identifier, functions, args, include_std); if (!fn) - /* The unqualified name could not be resolved. */ - fn = unqualified_fn_lookup_error (identifier); + { + /* The unqualified name could not be resolved. */ + if (complain) + fn = unqualified_fn_lookup_error (identifier); + else + fn = identifier; + } } if (fn && template_id) |