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-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a0c:e104:: with SMTP id w4mr920728qvk.28.1630625045782; Thu, 02 Sep 2021 16:24:05 -0700 (PDT) X-Received: by 2002:a25:a4c6:: with SMTP id g64mr1135084ybi.173.1630625045636; Thu, 02 Sep 2021 16:24:05 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 2 Sep 2021 16:24:05 -0700 (PDT) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=194.255.97.108; posting-account=hMbstgoAAAAIa4kxFYtvUVUHbE1RcZzT NNTP-Posting-Host: 194.255.97.108 References: <86ilzi29dc.fsf@stephe-leake.org> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <549e09ab-5456-407e-8e78-9d7772a4e561n@googlegroups.com> Subject: Re: Oddity with function returning image of fixed point type From: Jesper Quorning Injection-Date: Thu, 02 Sep 2021 23:24:05 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:62613 List-Id: torsdag den 2. september 2021 kl. 19.33.00 UTC+2 skrev Dmitry A. Kazakov: > On 2021-09-02 19:08, Stephen Leake wrote: > > Jesper Quorning writes: > > > >> Is something odd going on here? > >> I did not expect Image_Odd1/2 to return floating point images. > > > > Right, this looks like a compiler bug. LRM 3.5(13): > > > > S'Last > > S'Last denotes the upper bound of the range of S. The > > value of this attribute is of the type of S. > > > > But this is acting like Fpt'Last is universal_real. > No, it is this: > > LRM 4.10 (40/5) Had to go back to Ada 83 LRM to find a chapter 4.10. > "X'Image denotes the result of calling function S'Image with Arg being > X, where S is the nominal subtype of X." LRM 3.5 (35-36) says about the same. > The question is what is the nominal subtype of Fpt'Last. Well Image_Ok and Image_Odd_2 should both return Fpt'Last'Image so one of them must be bad. Found LRM 3.5 (27.7/2) describing the image of a fixed point type. Thanks for your responses. I will report the issue. /Jesper