Reverting the fix for PR c++/42260 fixes c++/45383.
This reverts commit r155415.
gcc/cp/
Reverted patch for PR c++/42260
* cp-tree.h (lookup_conversions): Reverted "Add new bool parameter to
declarationE."
* search.c (lookup_conversion): Reverted "Use new bool parameter in
definition".
* call.c (add_builtin_candidates): Reverted "Don't lookup template
conversion"
(convert_class_to_reference, build_user_type_conversion_1,
build_op_call): Reverted "Adjust".
* cvt.c (build_expr_type_conversion): Reverted "Likewise".
gcc/testsuite/
Reverted patch for PR c++/42260
* conversion/cast2.C: Reverted New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167248
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-11-29 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/45383
+ Reverted patch for PR c++/42260
+ * cp-tree.h (lookup_conversions): Reverted "Add new bool parameter to
+ declarationE."
+ * search.c (lookup_conversion): Reverted "Use new bool parameter in
+ definition".
+ * call.c (add_builtin_candidates): Reverted "Don't lookup template
+ conversion"
+ (convert_class_to_reference, build_user_type_conversion_1,
+ build_op_call): Reverted "Adjust".
+ * cvt.c (build_expr_type_conversion): Reverted "Likewise".
+
2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
* parser.c (cp_parser_objc_try_catch_finally_statement): Parse
if (!expr)
return NULL;
- conversions = lookup_conversions (s, /*lookup_template_convs_p=*/true);
+ conversions = lookup_conversions (s);
if (!conversions)
return NULL;
if (i == 0 && code == MODIFY_EXPR && code2 == NOP_EXPR)
return;
- convs = lookup_conversions (argtypes[i],
- /*lookup_template_convs_p=*/false);
+ convs = lookup_conversions (argtypes[i]);
if (code == COND_EXPR)
{
reference to it)... */
}
else
- conv_fns = lookup_conversions (fromtype,
- /*lookup_template_convs_p=*/true);
+ conv_fns = lookup_conversions (fromtype);
}
candidates = 0;
LOOKUP_NORMAL, &candidates);
}
- convs = lookup_conversions (type, /*lookup_template_convs_p=*/true);
+ convs = lookup_conversions (type);
for (; convs; convs = TREE_CHAIN (convs))
{
extern bool at_class_scope_p (void);
extern bool at_namespace_scope_p (void);
extern tree context_for_name_lookup (tree);
-extern tree lookup_conversions (tree, bool);
+extern tree lookup_conversions (tree);
extern tree binfo_from_vbase (tree);
extern tree binfo_for_vbase (tree, tree);
extern tree look_for_overrides_here (tree, tree);
if (!TYPE_HAS_CONVERSION (basetype))
return NULL_TREE;
- for (conv = lookup_conversions (basetype, /*lookup_template_convs_p=*/true);
- conv;
- conv = TREE_CHAIN (conv))
+ for (conv = lookup_conversions (basetype); conv; conv = TREE_CHAIN (conv))
{
int win = 0;
tree candidate;
functions in this node were selected. This function is effectively
performing a set of member lookups as lookup_fnfield does, but
using the type being converted to as the unique key, rather than the
- field name.
- If LOOKUP_TEMPLATE_CONVS_P is TRUE, the returned TREE_LIST contains
- the non-hidden user-defined template conversion functions too. */
+ field name. */
tree
-lookup_conversions (tree type,
- bool lookup_template_convs_p)
+lookup_conversions (tree type)
{
tree convs, tpl_convs;
tree list = NULL_TREE;
}
}
- if (lookup_template_convs_p == false)
- tpl_convs = NULL_TREE;
-
for (; tpl_convs; tpl_convs = TREE_CHAIN (tpl_convs))
{
tree probe, next;
2010-11-29 Dodji Seketeli <dodji@redhat.com>
+ PR c++/45383
+ Reverted patch for PR c++/42260
+ * conversion/cast2.C: Reverted new test.
+
+2010-11-29 Dodji Seketeli <dodji@redhat.com>
+
PR debug/46101
* g++.dg/debug/dwarf2/typedef5.C: New test
+++ /dev/null
-// Contributed by Dodji Seketeli <dodji@redhat.com>
-// Origin: PR c++/42260
-// { dg-do compile }
-
-struct A
-{
- template<typename T> operator T*();
-};
-
-int i = *A();// { dg-error "no match" }
-