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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!rochester!pt.cs.cmu.edu!sei!ajpo!eberard From: eberard@ajpo.sei.cmu.edu (Edward Berard) Newsgroups: comp.lang.ada Subject: Re: Record rep specs for private components Keywords: Ada, Rep Specs, Private Types, Compilers Message-ID: <523@ajpo.sei.cmu.edu> Date: 18 Jun 89 14:30:51 GMT List-Id: I have a problem with the following: > package a is > type aa is private; > private > type aa is range 0..1000; > end a; > > with a; > package b is > type bb is record > bbb : a.aa; > end record; > for bb use record > at mod 2; > bbb at 0 range 0..15; --Legal? > end record; > x : bb; > end b; If type a.aa is private, then its underlying implementation should be unknown outside of package a. This means that it should be impossible for another program unit to specify how much space an instance of this type should take up. [Of course, package a could supply operations which could provide alternative representations of known sizes, and these could be used in other program units.] In short, if the rep spec is legal Ada, it should not be, and should be fixed in Ada 9X. -- Ed Berard (301) 353-9652