comp.lang.ada
 help / color / mirror / Atom feed
* Abstract procedures in protected types
@ 1999-08-07  0:00 Aidan Skinner
  1999-08-09  0:00 ` Tucker Taft
  0 siblings, 1 reply; 3+ messages in thread
From: Aidan Skinner @ 1999-08-07  0:00 UTC (permalink / raw)


Is it possible to have an abstract procedure inside a protected
object? I have some of these in Libra.Data_Structures, and they
compile without warning or error with GNAT 3.11p. 

However, ObjectAda under Windows refuses to compile them, citing
LRM:9.4(5). This would appear to be correct, since it states:

protected_operation_declaration ::= subprogram_declaration
            | entry_declaration
            | representation_clause

and not does not mention abstract_subprogram_declaration (LRM:6.1(2)).

I think GNAT is at fault here, but would like to be sure before
submitting a bug report.

- Aidan

-- 
Gimme money, gimme sex, gimme UNIX and root access.
http://www.skinner.demon.co.uk/aidan/




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Abstract procedures in protected types
  1999-08-09  0:00 ` Tucker Taft
@ 1999-08-09  0:00   ` Aidan Skinner
  0 siblings, 0 replies; 3+ messages in thread
From: Aidan Skinner @ 1999-08-09  0:00 UTC (permalink / raw)


On Mon, 9 Aug 1999 16:22:20 GMT, Tucker Taft <stt@averstar.com> wrote:

>I am curious what you expected the abstract procedure declaration to
>accomplish, by the way...

some of them were artifacts from a kill and yank that I'd done to
produce a protected interface to a class. The rest were there on a
misunderstanding I'd obviously gotten into about dispatching (that
makes absoloutely no sense to me now). 

Basically I wanted a class-wide protected interface (taking an access
'Class paramater) that would dispatch to the appropriate
implementations.

- Aidan (who just loves these "doh! how on earth did I think *that*?" moments) 
-- 
Gimme money, gimme sex, gimme UNIX and root access.
http://www.skinner.demon.co.uk/aidan/




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Abstract procedures in protected types
  1999-08-07  0:00 Abstract procedures in protected types Aidan Skinner
@ 1999-08-09  0:00 ` Tucker Taft
  1999-08-09  0:00   ` Aidan Skinner
  0 siblings, 1 reply; 3+ messages in thread
From: Tucker Taft @ 1999-08-09  0:00 UTC (permalink / raw)


Aidan Skinner wrote:
> 
> Is it possible to have an abstract procedure inside a protected
> object? I have some of these in Libra.Data_Structures, and they
> compile without warning or error with GNAT 3.11p.
> 
> However, ObjectAda under Windows refuses to compile them, citing
> LRM:9.4(5). This would appear to be correct, since it states:
> 
> protected_operation_declaration ::= subprogram_declaration
>             | entry_declaration
>             | representation_clause
> 
> and not does not mention abstract_subprogram_declaration (LRM:6.1(2)).
> 
> I think GNAT is at fault here, but would like to be sure before
> submitting a bug report.

This appears to be a GNAT bug.  As you point out above, abstract
subprogram declarations are not permitted inside a protected definition.

I am curious what you expected the abstract procedure declaration to
accomplish, by the way...
> 
> - Aidan

-- 
-Tucker Taft   stt@averstar.com   http://www.averstar.com/~stt/
Technical Director, Distributed IT Solutions  (www.averstar.com/tools)
AverStar (formerly Intermetrics, Inc.)   Burlington, MA  USA




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-08-09  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-07  0:00 Abstract procedures in protected types Aidan Skinner
1999-08-09  0:00 ` Tucker Taft
1999-08-09  0:00   ` Aidan Skinner

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