This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++: template in namespace
- To: martin at mira dot isdn dot cs dot tu-berlin dot de
- Subject: Re: C++: template in namespace
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Sun, 08 Aug 1999 10:39:09 -0700
- Cc: benko at sztaki dot hu, gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <3405-Mon02Aug1999140432+0200-benko@lutra.sztaki.hu><199908081004.MAA24088@mira.isdn.cs.tu-berlin.de>
Index: decl2.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/decl2.c,v
retrieving revision 1.229
diff -u -p -r1.229 decl2.c
--- decl2.c 1999/08/07 22:28:50 1.229
+++ decl2.c 1999/08/08 09:04:08
@@ -4498,6 +4498,10 @@ 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 reduced the fndef to template_def, yet, so
+ the decls don't match. */
Don't use these funny abbreviations. "Reduced", "fndef", and
"template_def" are not terms of art in the compiler. I bet you mean
something like this:
/* 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 ...? */
I don't know what comes in the `when', but I'm sure you had something
in mind. I'd prefer to see a test-case referenced along with the
patch so that I know what's being fixed, without having to chase
through the archives. Would you mind resubmitting with these changes?
Thanks!
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com