namespaces -- time to do something?

Jason Merrill jason@cygnus.com
Wed Dec 10 19:56:00 GMT 1997


>>>>> Per Bothner <bothner@cygnus.com> writes:

>> Two "value fields" per id:  unqualified and qualified.  Both are lists.

> I suggest not using TREE_LIST nodes, though.  Instead add a
> lang_specific DECL_SHADOWS field, and use that to chain the
> actual decl nodes.  That makes it easy to find which decl
> is shadowing another.  It also saves the overhead of managing
> the TREE_LIST nodes.

Yep.  That's probably how we should handle unqualified lookup (along with a
nesting level index so that we know when to consult used namespaces).  It
doesn't work for qualified lookups, though.

> Another trick to consider:  Create a dummy declaration for each 'using'
> declaration.  In the Chill compiler, I called this an ALIAS_DECL.

Yep, that's what I was planning to do.

Jason



More information about the Gcc mailing list