Backport from mainline.
2003-12-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/2294
* decl.c (push_overloaded_decl): always construct an OVERLOAD
if the declaration comes from an using declaration.
From-SVN: r75045
+2003-12-27 Giovanni Bajo <giovannibajo@gcc.gnu.org>\r
+\r
+ Backport from mainline:\r
+ 2003-12-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>\r
+\r
+ PR c++/2294\r
+ * decl.c (push_overloaded_decl): always construct an OVERLOAD\r
+ if the declaration comes from an using declaration.\r
+
2003-12-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Backport from mainline:
}
}
- 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,\r
+ because it's the only way to remember that the declaration comes\r
+ from 'using', and have the lookup behave correctly. */\r
+ || (flags & PUSH_USING))\r
{
if (old && TREE_CODE (old) != OVERLOAD)
new_binding = ovl_cons (decl, ovl_cons (old, NULL_TREE));