From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: gnoga build fails on Mac Date: Tue, 30 Jun 2020 20:09:35 -0500 Organization: JSA Research & Innovation Message-ID: References: <4bbbd09e-e14f-46f5-a510-bdf0c17eba8fo@googlegroups.com> <57adcbd8-4583-4c0f-8bdf-1ac8bd6c6913o@googlegroups.com> Injection-Date: Wed, 1 Jul 2020 01:09:37 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="14951"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader01.eternal-september.org comp.lang.ada:59279 List-Id: "Jeffrey R. Carter" wrote in message news:rdc8p2$u5v$1@dont-email.me... > On 6/29/20 2:55 AM, Randy Brukardt wrote: >> "Jeffrey R. Carter" wrote in message >> news:rcq55l$r03$1@dont-email.me... >>> On 6/22/20 7:56 AM, Dmitry A. Kazakov wrote: >>>> On 22/06/2020 05:15, Roger wrote: >>>>> >>>>> demo/db_maker/movies.adb >>>>> "equality operator must be declared before type "Movie_Info" is frozen >>>>> (RM 4.5.2 (9.8)) (Ada 2012)" >>>> >>>> That looks like a compiler bug to me. >>> >>> I agree. What happens if you change "=" from an expression function to a >>> regular function? >> >> It is illegal either way. This was an incompatible change in Ada 2012; it >> stems from the fact that "=" of untagged records composes in Ada 2012 but >> not in earlier versions of Ada. Composition cannot be view dependent, and >> as >> such we cannot allow "late" declarations of operators where some users >> would >> not see the redefined operator. > > The declaration of "=" is the first declaration after the type declaration > in a procedure. How can it be "late"? What users might not see the > operator? I based my comment on the error message; I did not look at the code. The message says (correctly) that "=" must be declared before the type Movie_Info is frozen. Ada 83 has some stupid rules allowing "late" declarations of operators that do not override the usual operators. One cannot allow that to happen for record "=". (It shouldn't be allowed ever, but it is one stupid rule that we're stuck with.) I suppose there could be a compiler bug if Movie_Info is prematurely frozen, but I suspect it is much more likely that the code is illegal. GNAT didn't enforce this rule until recently (it has recently been catching up with newer ACATS tests for newer incompatible rules), so I find it likely that the code is wrong. Randy.