comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: Representation item appears too late
Date: Thu, 25 Oct 2007 20:37:27 +0200
Date: 2007-10-25T20:37:27+02:00	[thread overview]
Message-ID: <871wbjghw8.fsf@ludovic-brenta.org> (raw)
In-Reply-To: 1193326881.224163.110410@q3g2000prf.googlegroups.com

Adam Beneschan writes:
> The error message you're getting isn't very helpful.  What you're
> =================================================================
> (10) For an untagged derived type, no type-related representation
> items are allowed if the parent type is a by-reference type, or has
> any user-defined primitive subprograms.
>
> (AARM 10.b) Reason: ... The reason for forbidding type-related
> representation items on untagged types with user-defined primitive
> subprograms was to prevent implicit change of representation for type-
> related aspects of representation upon calling inherited subprograms,
> because such changes of representation are likely to be expensive at
> run time. ...
> =================================================================

Ah, that's what I missed when I looked in the ARM.  I should have
spent five minutes more and I'm sure I'd have found it :/

Thanks a lot!

I'll apply the rep clause to the top-level type.  In this particular
case, artificially making the procedure not primitive is even uglier
(even though nothing depends on that procedure being primitive) as it
would introduce unnecessary entities in the package spec.

-- 
Ludovic Brenta.



  reply	other threads:[~2007-10-25 18:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-25 13:35 Representation item appears too late Ludovic Brenta
2007-10-25 13:46 ` Lucretia
2007-10-25 15:41 ` Adam Beneschan
2007-10-25 18:37   ` Ludovic Brenta [this message]
2007-10-26  4:08 ` Vincent Marciante
2007-10-26  8:34   ` Ludovic Brenta
replies disabled

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