decl2.c (set_decl_namespace): Do not complain about non-matching decls if processing...
authorMartin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
Tue, 10 Aug 1999 16:58:24 +0000 (16:58 +0000)
committerMartin v. Löwis <loewis@gcc.gnu.org>
Tue, 10 Aug 1999 16:58:24 +0000 (16:58 +0000)
* decl2.c (set_decl_namespace): Do not complain about non-matching
decls if processing a template.

From-SVN: r28649

gcc/cp/ChangeLog
gcc/cp/decl2.c

index b6fd5428cf8775e430e8bb6f2084d4ae6307bedd..6575c57780495414740cfe0faee8c39e82d3afaa 100644 (file)
@@ -1,3 +1,8 @@
+1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
+
+       * decl2.c (set_decl_namespace): Do not complain about non-matching
+       decls if processing a template.
+
 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
 
        * decl.c (build_ptrmemfunc_type): Handle qualified
index a044f450d738f28292078661b25bb3ca423d13d6..c5a492f8d526139158f77467a5a771cef932f87e 100644 (file)
@@ -4499,6 +4499,12 @@ set_decl_namespace (decl, scope, friendp)
       /* Since decl is a function, old should contain a function decl. */
       if (!is_overloaded_fn (old))
        goto complain;
+      if (processing_template_decl || processing_specialization)
+       /* We have not yet called push_template_decl to turn the
+          FUNCTION_DECL into a TEMPLATE_DECL, so the declarations
+          won't match.  But, we'll check later, when we construct the
+          template.  */
+       return;
       for (; old; old = OVL_NEXT (old))
        if (decls_match (decl, OVL_CURRENT (old)))
          return;