From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,dd41b5654bd378e7 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!news.tiscali.fr!club-internet.fr!feedme-small.clubint.net!news.astraweb.com!border2.a.newsrouter.astraweb.com!hwmnpeer01.ams!news.highwinds-media.com!feeder1.cambrium.nl!feed.tweaknews.nl!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Representation item appears too late References: <87640vgvvl.fsf@ludovic-brenta.org> <1193326881.224163.110410@q3g2000prf.googlegroups.com> Date: Thu, 25 Oct 2007 20:37:27 +0200 Message-ID: <871wbjghw8.fsf@ludovic-brenta.org> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:Kz2R8HgeoZ1u0wr1CkBBie6mBec= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Tele2 X-Trace: DXC=PenI7I\VgW2Mii]OaCe>F66`Y6aWje^Y:f 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.