From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 8 Sep 93 18:36:49 GMT From: emery@mitre-bedford.arpa (David Emery) Subject: Re: Generic Pointer Type Message-ID: List-Id: There is no guarantee *within the language* that any unchecked conversion will have any meaning. In particular, there are systems where you *cannot* convert between arbitrary access types in any meaningful sense. For instance, access to scalar may be the address of the object, but access to array may be a structure holding the first index, length and address of the first element. In this case, integer_access'size /= array_access'size. Another problem can occur with collections. An access value may be an offset within a given collection. Two access types may define different collections, so that converting from one to another produces a 'meaningless' value, because the access values are not addresses, but are offsets within different collections, and the 'collection address' is NOT stored with the access value. That's how Unchecked_Conversion is "outside of the language". The WG9 Uniformity Rapporteur Group has been studying this problem for quite some time, and produced some recommendations for Ada83. Note that Ada9X addresses part of this problem within the scope of the language. Anytime you use Unchecked_Conversion, you incur a portability risk. This doesn't mean "don't do it", but it means that "understand what you're doing." dave