This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++: template in namespace



  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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]