diff options
author | Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de> | 1999-08-10 16:58:24 +0000 |
---|---|---|
committer | Martin v. Löwis <loewis@gcc.gnu.org> | 1999-08-10 16:58:24 +0000 |
commit | d82d65d886aa88cd38f03c768a6bd3aac3dc21f2 (patch) | |
tree | 7efda6a811a19978bb7684d31224b45e2a4f2f4c | |
parent | c8e7d2e6329fc6b415b86764b55dc6fe56043b71 (diff) | |
download | gcc-d82d65d886aa88cd38f03c768a6bd3aac3dc21f2.zip gcc-d82d65d886aa88cd38f03c768a6bd3aac3dc21f2.tar.gz gcc-d82d65d886aa88cd38f03c768a6bd3aac3dc21f2.tar.bz2 |
decl2.c (set_decl_namespace): Do not complain about non-matching decls if processing a template.
* decl2.c (set_decl_namespace): Do not complain about non-matching
decls if processing a template.
From-SVN: r28649
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b6fd542..6575c57 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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 diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index a044f45..c5a492f 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -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; |