"AdaMagica" wrote in message news:9ac3f3db-819c-4232-b580-30a67411dd70@c21g2000yqk.googlegroups.com... >> procedure Aaa is >> >> type Proc_Ptr is access procedure; >> >> X : Proc_Ptr; >> >> generic >> with procedure Bbb is X.all; >> -- aaa.adb:8:31: expect valid subprogram name as default >> package Pkg is >> end Pkg; > >AARM 12.6(5.b) The evaluation of the default_name takes place during >the elaboration of each instantiation that uses the default, as >defined in 12.3, �Generic Instantiation�. > >So I don't see a problem. I agree, I think this is legal as the language is written. I know from experience that most compilers have problems with dynamic subprogram names showing up in unusual contexts. For instance, the ARG decided to make such names illegal for the specification of stream attributes because of the near impossibility of writing anything useful with a dynamic name (most compilers didn't support it anyway). But in this case, it seems as if it could be useful, so presumably it is just a compiler bug. Randy.