comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Interrupt_Handler and "directly specified"
Date: Fri, 20 Nov 2015 15:25:46 -0600
Date: 2015-11-20T15:25:46-06:00	[thread overview]
Message-ID: <n2o34r$c1r$1@loke.gir.dk> (raw)
In-Reply-To: n2nou4$jap$1@dont-email.me

"G.B." <bauhaus@futureapps.invalid> wrote in message 
news:n2nou4$jap$1@dont-email.me...
> For a protected handler, I had specified an aspect,
>
>    procedure On_1
>    with Interrupt_Handler => True;
>
> and got a strange compiler diagnostic, listed below.
>
> Is the above syntax correct?

Yes.

> I could drop " => True" and the compiler seemed happy. OTOH,
> the RM states, in C.3.1 6.2/3, that "if not directly specified,
> the aspect is False".
>
> I don't know what "directly specified" in RM C.3.1 means,
> exactly. Does it mean just specified as opposed to no
> such aspect specified (in source, near it)? So drop "=> ..."
> for truth?

"directly specified" means explicitly given on this entity (as opposed to 
inheriting a value from some ancestor, which is considered "specified").

If you leave the value off of any aspect specification, the value is True. 
(see 13.1.1(15/3)). So in
    with Pack, Atomic, Pure, Interrupt_Handler, Import;
all of these aspects have the value True. (And you'll get some errors.)

If
    procedure On_1 with Interrupt_Handler;
works and
    procedure On_1 with Interrupt_Handler => True;
does not, you've got a compiler bug, because these mean exactly the same 
thing.

                               Randy.




  parent reply	other threads:[~2015-11-20 21:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-20 18:33 Interrupt_Handler and "directly specified" G.B.
2015-11-20 19:22 ` Simon Wright
2015-11-20 21:25 ` Randy Brukardt [this message]
2015-11-22  9:59   ` Georg Bauhaus
replies disabled

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