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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a24:5755:: with SMTP id u82mr1812345ita.16.1545391923991; Fri, 21 Dec 2018 03:32:03 -0800 (PST) X-Received: by 2002:a9d:da3:: with SMTP id 32mr40079ots.3.1545391923859; Fri, 21 Dec 2018 03:32:03 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.166.216.MISMATCH!q69no35799itb.0!news-out.google.com!v71ni73ita.0!nntp.google.com!q69no35794itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 21 Dec 2018 03:32:03 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=98.118.241.43; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf NNTP-Posting-Host: 98.118.241.43 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <67df9938-98a7-44d9-b8d0-496195355358@googlegroups.com> Subject: Re: Potential Coextension Bug in GNAT From: Jere Injection-Date: Fri, 21 Dec 2018 11:32:03 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:55097 Date: 2018-12-21T03:32:03-08:00 List-Id: On Thursday, December 20, 2018 at 9:25:42 PM UTC-5, Randy Brukardt wrote: > > > So it does look like a GNAT bug. There is the possibility that they are > associating the discriminant with the temporary object associated with the > allocator, and not the return object, but that seems unnecessarily > unfriendly of an interpretation. And it would be wrong for any type that > requires built-in-place (I didn't look at the actual declaration of the > type). I think the rules are supposed to prevent that interpretation, but > whether they really do is an interesting question that I have no interest in > exploring. Ok, that makes me feel better. I was concerned I was misinterpreting the RM about the function return (for build in place). The type was limited, which I believe requires it to be build in place. > > P.S. Did I mention I hate coextensions?? They provide an endless opportunity > to puzzle over rules that really don't matter in the end (and most likely > aren't quite right). I suppose they've helped me keep employed running the > ARG. :-) Overall, they aren't super useful and are not very intuitive. I don't know the history for why they were added to the language though. I will say they do provide one thing to Ada that no other feature in the language seems to, so there is that. But I don't know the cost versus reward of them.