diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-21 15:01:15 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-21 15:01:15 +0000 |
commit | 16505e54d862368f604d014034e556fb359b7754 (patch) | |
tree | 31e4e9742f330f0eb81d52e9f17c01cda5a74306 /gcc/cp/semantics.c | |
parent | 41ac64ae1f281e5a657d87aeaadf1547b9b692b7 (diff) | |
download | gcc-16505e54d862368f604d014034e556fb359b7754.tar.gz |
2011-05-21 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 173996 using svnmerge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@173997 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 6b62dd2cb53..a7ca50d15e2 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) @@ -2170,6 +2176,7 @@ finish_call_expr (tree fn, VEC(tree,gc) **args, bool disallow_virtual, if (TREE_CODE (result) == INDIRECT_REF) result = TREE_OPERAND (result, 0); result = build_call_vec (TREE_TYPE (result), orig_fn, orig_args); + SET_EXPR_LOCATION (result, input_location); KOENIG_LOOKUP_P (result) = koenig_p; release_tree_vector (orig_args); result = convert_from_reference (result); |