------- Comment #6 from pault at gcc dot gnu dot org  2007-11-19 15:10 -------
(In reply to comment #5)
> Off to generics and operators now!

Ahhh... I have run into a serious problem here.  It transpires that renaming is
not accomplished for generic interfaces by keeping the use-name symbol with
multiple symtrees, each with a local-name.  Instead, the symtree and the symbol
have the local-name.  This breaks the mechanism that I evolved above.

The DEC Manual puts the rules rather nicely:

If more than one USE statement for a given module appears in a scoping unit,
the following rules apply: 

If one USE statement does not have the ONLY option, all public entities in the
module are accessible, and any rename- lists and only-lists are interpreted as
a single, concatenated rename-list. 

If all the USE statements have ONLY options, all the only-lists are interpreted
as a single, concatenated only-list. Only those entities named in one or more
of the only-lists are accessible.

This, I think, shows the way forward.  ie. In matching the USE statements, we
only build up the rename-list and flag the presence of a USE statement without
an ONLY. Then, at the last USE statement, we process all the referenced .mod
files just once, using the concatenated rename-list as an only-list or a rename
list, according to what we have seen.

Paul


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33541

Reply via email to