- (1)
- The normal visibility rules do not apply within a parent_unit_name or a
context_clause, nor within a pragma that appears at the place of a
compilation unit. The special visibility rules for those contexts are given
here.
Static Semantics
- (2)
- Within the parent_unit_name at the beginning of a library_item, and within
a with_clause, the only declarations that are visible are those that are library_items
of the environment, and the only declarations that are directly visible are
those that are root library_items of the environment. Notwithstanding the
rules of 4.1.3, an expanded name in a with_clause
may consist of a prefix that denotes a generic package and a selector_name
that denotes a child of that generic package. (The child is necessarily a
generic unit; see 10.1.1.)
- (3)
- Within a use_clause or pragma that is within a context_clause, each
library_item mentioned in a previous with_clause of the same context_clause
is visible, and each root library_item so mentioned is directly visible. In
addition, within such a use_clause, if a given declaration is visible or
directly visible, each declaration that occurs immediately within the given
declaration's visible part is also visible. No other declarations are
visible or directly visible.
- (4)
- Within the parent_unit_name of a subunit, library_items are visible as
they are in the parent_unit_name of a library_item; in addition, the
declaration corresponding to each body_stub in the environment is also
visible.
- (5)
- Within a pragma that appears at the place of a compilation unit, the
immediately preceding library_item and each of its ancestors is visible. The
ancestor root library_item is directly visible.
-- Email comments, additions, corrections, gripes, kudos, etc. to:
Magnus Kempe -- Magnus.Kempe@di.epfl.ch
Copyright statement
Page last generated: 95-03-12