summaryrefslogtreecommitdiff
path: root/gcc/cp/call.c
diff options
context:
space:
mode:
authorfjahanian <fjahanian@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-15 20:38:23 +0000
committerfjahanian <fjahanian@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-15 20:38:23 +0000
commitdb3bf8f6efc63e0a88baa4d566885af6079fcf93 (patch)
tree9eb1bd6359f4248ee64777e3f0ec9b93df966070 /gcc/cp/call.c
parenteb0bc208de919037e4da09054c89b24642ed1622 (diff)
downloadgcc-db3bf8f6efc63e0a88baa4d566885af6079fcf93.tar.gz
Fix Infinite Stack Recursion Regression.
* cp-tree.h (can_convert_arg, fn_type_unification): New argument. * call.c (add_template_candidate_real): Pass down 'flags' to fn_type_unification. (can_convert_arg): New 'flags' argument. Pass it to call to implicit_conversion instead of LOOKUP_NORMAL. (can_convert): Add LOOKUP_NORMAL to call to can_convert_arg. * class.c (resolve_address_of_overloaded_function): Ditto. (resolve_address_of_overloaded_function): Ditto. * decl.c (reshape_init, check_default_argument): Ditto. * typeck.c (build_ptrmemfunc): Ditto. * pt.c (type_unification_real): Add 'flags' argument. (fn_type_unification): Pass 'flags' to type_unification_real. (type_unification_real): Pass new 'flags' argument to call to can_convert_arg. Oked by Geoff Keating. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103120 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r--gcc/cp/call.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index cdc068c90eb..9f277cdc84a 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -2203,7 +2203,7 @@ add_template_candidate_real (struct z_candidate **candidates, tree tmpl,
i = fn_type_unification (tmpl, explicit_targs, targs,
args_without_in_chrg,
- return_type, strict);
+ return_type, strict, flags);
if (i != 0)
return NULL;
@@ -6286,13 +6286,13 @@ tourney (struct z_candidate *candidates)
bool
can_convert (tree to, tree from)
{
- return can_convert_arg (to, from, NULL_TREE);
+ return can_convert_arg (to, from, NULL_TREE, LOOKUP_NORMAL);
}
/* Returns nonzero if ARG (of type FROM) can be converted to TO. */
bool
-can_convert_arg (tree to, tree from, tree arg)
+can_convert_arg (tree to, tree from, tree arg, int flags)
{
conversion *t;
void *p;
@@ -6302,7 +6302,7 @@ can_convert_arg (tree to, tree from, tree arg)
p = conversion_obstack_alloc (0);
t = implicit_conversion (to, from, arg, /*c_cast_p=*/false,
- LOOKUP_NORMAL);
+ flags);
ok_p = (t && !t->bad_p);
/* Free all the conversions we allocated. */