aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-05-20 14:01:22 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-05-20 14:01:22 -0400
commit94df301fa033641561145d44ed48cf4c85d43a2c (patch)
treea133483f2142f1c02de48fd4af4865636ad9ed75 /gcc/cp/semantics.c
parent6e04dcd56f7d94288467234f065fca6006761cfe (diff)
downloadgcc-94df301fa033641561145d44ed48cf4c85d43a2c.zip
gcc-94df301fa033641561145d44ed48cf4c85d43a2c.tar.gz
gcc-94df301fa033641561145d44ed48cf4c85d43a2c.tar.bz2
re PR c++/24163 (dependent Base class scope examined during unqualified name lookup in template)
PR c++/24163 PR c++/29131 gcc/cp/ * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Avoid repeating unqualified lookup. * semantics.c (perform_koenig_lookup): Add complain parm. * cp-tree.h: Adjust. * parser.c (cp_parser_postfix_expression): Adjust. (cp_parser_perform_range_for_lookup): Adjust. libstdc++-v3/ * include/ext/pb_ds/assoc_container.hpp: Explicitly qualify calls to functions from dependent bases. * include/ext/pb_ds/detail/rb_tree_map_/erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/rb_tree_map_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/splay_tree_/erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/splay_tree_/insert_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/splay_tree_/splay_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/splay_tree_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/tree_policy/ order_statistics_imp.hpp: Likewise. * include/ext/pb_ds/detail/trie_policy/ prefix_search_node_update_imp.hpp: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/rope: Likewise. * include/ext/ropeimpl.h: Likewise. * testsuite/util/exception/safety.h: Likewise. * testsuite/util/native_type/native_priority_queue.hpp: Likewise. * testsuite/util/testsuite_io.h: Likewise. * include/std/functional: Declare mem_fn earlier. * include/tr1/functional: Likewise. * include/tr1/exp_integral.tcc: Declare __expint_E1 earlier. From-SVN: r173965
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c12
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)