[comp.lang.ada] Generic Package Names

mendal@ANNA.STANFORD.EDU (Geoff Mendal) (04/01/89)

Everyone knows that outside a generic unit, the name of the unit denotes
the generic unit.  Similarly, within the generic unit, this name denotes
the unit obtained by instantiation.  See Ada83 12.1(5).  Our compiler
disallows the following citing 8.4(2):

  generic
  package P is
    use P;  -- cites this as illegal
  end P;

Am I missing something?  Within the generic unit, the name P should
denote the current instantiation, ergo a "real" package instead of
a generic one.  Never mind that the use clause, if legal, is a no-op.
If a generic subprogram can be called recursively, then why can't
a generic package name appear in a use clause inside the generic unit?

Simple, consise answers will do.  Let's not make this issue fill
gigabytes of disk all over the internet.

gom