PR c++/2294
* name-lookup.c (push_overloaded_decl): always construct an OVERLOAD
if the declaration comes from an using declaration.
From-SVN: r74667
+2003-12-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>\r
+\r
+ PR c++/2294\r
+ * name-lookup.c (push_overloaded_decl): always construct an OVERLOAD\r
+ if the declaration comes from an using declaration.\r
+\r
2003-12-15 Mark Mitchell <mark@codesourcery.com>
PR c++/10926
}
}
- if (old || TREE_CODE (decl) == TEMPLATE_DECL)
+ if (old || TREE_CODE (decl) == TEMPLATE_DECL
+ /* If it's a using declaration, we always need to build an OVERLOAD,
+ because it's the only way to remember that the declaration comes
+ from 'using', and have the lookup behave correctly. */
+ || (flags & PUSH_USING))
{
if (old && TREE_CODE (old) != OVERLOAD)
new_binding = ovl_cons (decl, ovl_cons (old, NULL_TREE));