]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
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 17:16:26 +0000 (17:16 +0000)
committerMartin v. Löwis <loewis@gcc.gnu.org>
Tue, 10 Aug 1999 17:16:26 +0000 (17:16 +0000)
* decl2.c (set_decl_namespace): Do not complain about non-matching
decls if processing a template.

From-SVN: r28651

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

index 9e55dfd89c0f099121b239b46aca9aba987bc8fa..071d2b7fa0afafca6f9382f26ff36797baeef999 100644 (file)
@@ -1,3 +1,8 @@
+1999-08-08  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  Jason Merrill  <jason@yorick.cygnus.com>
 
        * parse.y (function_try_block): Call end_protect_partials
index debcf3717e9128f8f1232dfeb77111e60ee40a12..e5b758955afdb2136ed3db2af229e4e8501e195b 100644 (file)
@@ -4491,6 +4491,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;