aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorloewis <loewis@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-10 17:16:26 +0000
committerloewis <loewis@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-10 17:16:26 +0000
commitbfc313d4665dcc429fde4a5ee3216e8b501bf159 (patch)
tree8bea56e5649a091d0847e399df985e022c5e5d86
parentb2ca03a55093a9e1f553989dba250fd602160fd8 (diff)
* decl2.c (set_decl_namespace): Do not complain about non-matching
decls if processing a template. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-2_95-branch@28651 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl2.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 9e55dfd89c0..071d2b7fa0a 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index debcf3717e9..e5b758955af 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -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;