diff options
author | loewis <loewis@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-08-10 16:58:24 +0000 |
---|---|---|
committer | loewis <loewis@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-08-10 16:58:24 +0000 |
commit | ef10f844e44cc6c0b026d628089d112d7f67abb4 (patch) | |
tree | 7efda6a811a19978bb7684d31224b45e2a4f2f4c /gcc/cp/decl2.c | |
parent | 68ddcc2a5b27207ac116b533345393064d638981 (diff) | |
download | gcc-ef10f844e44cc6c0b026d628089d112d7f67abb4.tar.gz |
* 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/trunk@28649 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index a044f450d73..c5a492f8d52 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; |