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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Why is the destructor called multiple times after I declare an object? Date: Mon, 11 Jan 2016 17:20:02 +0000 Organization: A noiseless patient Spider Message-ID: References: <293c58ac-4ebd-488a-abcc-b6e88811eec8@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="378129f99c3c32c8ce464f7428f5f75e"; logging-data="11564"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19bgyH9XTyvSKuFMMXnCiNKhBdkaTMfoHk=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:4Ud7BfqTu7AVH9hDN+AZGxvOJew= sha1:T7mpv3wdjpRI9UyduFITLmB5xZI= Xref: news.eternal-september.org comp.lang.ada:29090 Date: 2016-01-11T17:20:02+00:00 List-Id: Brian Drummond writes: > Somehow I expected "extended return" to allocate space and "build in > place" during the execution of the return statement. > > Is this something legal that Gnat doesn't take advantage of? Or is > there a Gnat option I'm not aware of? ARM 7.6 (17.2-17.4) ff [1]: must build in place if the full type is (immutably) limited, or (contains components that are) controlled. Otherwise, up to the compiler. Doesn't say anything about extended return. [1] http://www.adaic.org/resources/add_content/standards/12rm/html/RM-7-6.html#p17.2