+2003-03-11 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/9336
+ * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
+ to merge old and new declarations.
+
2003-03-12 Alexandre Oliva <aoliva@redhat.com>
* g++.1: Remove.
2003-03-11 Mark Mitchell <mark@codesourcery.com>
+ PR c++/9336
+ * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
+ to merge old and new declarations.
+
PR c++/9924
* decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
{
tree tmp, tmp1;
- if (oldval && !is_overloaded_fn (oldval))
- {
- duplicate_decls (OVL_CURRENT (BINDING_VALUE (decls)), oldval);
- oldval = NULL_TREE;
- }
-
*newval = oldval;
for (tmp = BINDING_VALUE (decls); tmp; tmp = OVL_NEXT (tmp))
{
else
{
*newval = BINDING_VALUE (decls);
- if (oldval)
- duplicate_decls (*newval, oldval);
- }
+ if (oldval && !decls_match (*newval, oldval))
+ error ("`%D' is already declared in this scope", name);
+ }
*newtype = BINDING_TYPE (decls);
- if (oldtype && *newtype && oldtype != *newtype)
+ if (oldtype && *newtype && !same_type_p (oldtype, *newtype))
{
error ("using declaration `%D' introduced ambiguous type `%T'",
name, oldtype);