A couple of namespace+template bugs.

Martin von Loewis martin@mira.isdn.cs.tu-berlin.de
Fri Feb 27 00:36:00 GMT 1998


> I figured that this would be implemented via a new tree code USING_DECL,
> which just points to the decl being used.  Lookup would find the USING_DECL
> and return the target.

I plan to have a list of using decls in the namespace binding, each
of which points to entities selected. Please note that there might
be more than one:

namespace A{
  void X();
  void X(int);
  class X;
}

using A::X;

uses both the overloaded function and the class. I'll have to put both
decls into the binding, so that a later

class X;
/* or */
void X(int);

will complain about the duplicate declaration, whereas another

using B::X;

might or might not (depending on what B::X is). So it seems that a
using-declaration cannot really go through pushdecl(). I'm currently
using a TREE_LIST for the using decls, although I agree that a proper
decl node would be better.

> Class template names can't be overloaded with anything else.

Indeed, and this should simplify things.

Martin



More information about the Gcc-bugs mailing list