comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: Defaults for formal subprogram
Date: Wed, 28 Apr 2010 03:53:58 -0700 (PDT)
Date: 2010-04-28T03:53:58-07:00	[thread overview]
Message-ID: <aa2387f5-b210-4cd8-a427-6db1abc542d6@j21g2000yqh.googlegroups.com> (raw)
In-Reply-To: 9ac3f3db-819c-4232-b580-30a67411dd70@c21g2000yqk.googlegroups.com

Christoph Grein wrote on comp.lang.ada:
> > 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 think this violates 12.6(3/2) and 12.6(4):

3/2 subprogram_default ::= default_name | <> | null
4    default_name ::= name

Here, you are trying to use an expression as opposed to a name.

--
Ludovic Brenta.



  reply	other threads:[~2010-04-28 10:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-28  9:57 Defaults for formal subprogram Maxim Reznik
2010-04-28 10:31 ` AdaMagica
2010-04-28 10:53   ` Ludovic Brenta [this message]
2010-04-28 10:56     ` Ludovic Brenta
2010-04-28 21:12   ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox