+2005-03-02 Alexandre Oliva <aoliva@redhat.com>
+
+ * name-lookup.c (push_overloaded_decl): Don't error if the new
+ decl matches the old one.
+ * decl.c (redeclaration_error_message): Likewise.
+
2005-02-24 Jakub Jelinek <jakub@redhat.com>
PR c++/20175
/* Process declarations and variables for C++ compiler.
Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GCC.
/* If both functions come from different namespaces, this is not
a redeclaration - this is a conflict with a used function. */
if (DECL_NAMESPACE_SCOPE_P (olddecl)
- && DECL_CONTEXT (olddecl) != DECL_CONTEXT (newdecl))
+ && DECL_CONTEXT (olddecl) != DECL_CONTEXT (newdecl)
+ && ! decls_match (olddecl, newdecl))
return "`%D' conflicts with used function";
/* We'll complain about linkage mismatches in
/* Definitions for C++ name lookup routines.
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net>
This file is part of GCC.
if (TREE_CODE (tmp) == OVERLOAD && OVL_USED (tmp)
&& !(flags & PUSH_USING)
&& compparms (TYPE_ARG_TYPES (TREE_TYPE (fn)),
- TYPE_ARG_TYPES (TREE_TYPE (decl))))
+ TYPE_ARG_TYPES (TREE_TYPE (decl)))
+ && ! decls_match (fn, decl))
error ("`%#D' conflicts with previous using declaration `%#D'",
decl, fn);