This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: namespaces -- time to do something?
- To: egcs at cygnus dot com, bothner at cygnus dot com
- Subject: Re: namespaces -- time to do something?
- From: Jason Merrill <jason at cygnus dot com>
- Date: 10 Dec 1997 19:56:18 -0800
- References: <19971210043419.02748@loria.fr><199712110309.TAA00961.cygnus.egcs@cygnus.com>
- Reply-To: egcs at cygnus dot com
>>>>> 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