This is the mail archive of the gcc@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: namespaces -- time to do something?


>>>>> 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


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