From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!feeder.eternal-september.org!news.mixmin.net!news2.arglkargh.de!news.karotte.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Constancy of X'Address? Date: Wed, 5 Apr 2023 12:24:39 +0300 Organization: Tidorum Ltd Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net juDKVaBYK50YlczI6SaMHQeKit8sKDr5/XWq9+txS5IGT923Oo Cancel-Lock: sha1:9BjAnEvFBfxzAKv0hYKrLm8Ga34= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Content-Language: en-US Xref: feeder.eternal-september.org comp.lang.ada:65071 List-Id: A discussion in comp.arch (on the new C23 standard for C) brought up these questions, which I could not answer with confidence: - Is the address of an object constant in Ada? That is, if I have some object X in an Ada program, do repeated applications of X'Address always return the same value? - Does the answer depend on how X is allocated (created): on the library level, on the stack, or in a pool ("new")? The issue behind this question is whether an Ada program could use garbage collection that moves objects around, for example a compacting collector.