From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Merrill To: egcs@cygnus.com, bothner@cygnus.com Subject: Re: namespaces -- time to do something? Date: Wed, 10 Dec 1997 19:56:00 -0000 Message-id: References: <19971210043419.02748@loria.fr> <199712110309.TAA00961.cygnus.egcs@cygnus.com> X-SW-Source: 1997-12/msg00633.html >>>>> Per Bothner 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