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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4c08cfbd3f797c1c X-Google-Attributes: gid103376,public From: dale@cs.rmit.edu.au (Dale Stanbrough) Subject: Re: simple question - how to emulate void * ? Date: 1998/10/24 Message-ID: #1/1 X-Deja-AN: 404581155 References: <9v6hGdgMLuwN-pn2-Oc41W71Dq3U9@dt182n2f.tampabay.rr.com> <362EF435.7575@ddre.dk> <70pfpm$qe5@gcsin3.geccs.gecm.com> <1104_909142646@DZOG-CHEN> X-Complaints-To: abuse@cs.rmit.edu.au X-Trace: emu.cs.rmit.edu.au 909231274 14718 131.170.27.23 (24 Oct 1998 12:14:34 GMT) Organization: RMIT NNTP-Posting-Date: 24 Oct 1998 12:14:34 GMT Newsgroups: comp.lang.ada Date: 1998-10-24T12:14:34+00:00 List-Id: Ed Falis wrote: "In OA, both System and System.Storage_Units declare "+" operators with Address and Integer or Storage_Offset respectively. Since there are use clauses for both units, the compiler doesn't know how to interpret the numeric literal "1" on the right hand side of the expression. So, eliminate one of the use clauses, or qualify the literal, e.g. Integer'(1) or Storage_Offset'(1), and the code will compile and execute. My guess is that the address arithmetic in OA System was left in for compatibility with the Alsys Ada 83 compilers it replaced. - Ed Falis Aonix" This is then a problem with Ada, that the legality of calling a routine in a child package can be affected by the exact definition of a type defined as "implementation defined". package System has... type Address is ; package System.Storage_Elements is... address manipulation routines such as +, - and mod. If Address is defined as an integer type, then it automatically gets all of the numeric operations inherited. If Address is an access type, then it gets not much. Perhaps it would have been better if the LRM specifically excluded these operations from package System.Address, given the presence of System.Storage_Elements. Perhaps we need to understand the rationale of having type Address is vs. type Address is private; I certainly haven't hit this particular problem before, and it _is_ an annoying "feature". Can anyone clarify this point for me? Dale