From: Martin v. Loewis Date: Tue, 10 Aug 1999 17:16:26 +0000 (+0000) Subject: decl2.c (set_decl_namespace): Do not complain about non-matching decls if processing... X-Git-Tag: releases/gcc-2.95.1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ceb04b1919393adfa82c234534674ee644aa720;p=thirdparty%2Fgcc.git 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: r28651 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9e55dfd89c0f..071d2b7fa0af 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +1999-08-08 Martin v. Loewis + + * decl2.c (set_decl_namespace): Do not complain about non-matching + decls if processing a template. + 1999-08-09 Jason Merrill * parse.y (function_try_block): Call end_protect_partials diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index debcf3717e91..e5b758955afd 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;