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 10.36.104.139 with SMTP id v133mr4945829itb.0.1520117674262; Sat, 03 Mar 2018 14:54:34 -0800 (PST) X-Received: by 10.157.41.184 with SMTP id n53mr506848otb.11.1520117673766; Sat, 03 Mar 2018 14:54:33 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!e10no854342itf.0!news-out.google.com!a25ni2176itj.0!nntp.google.com!w142no849520ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 3 Mar 2018 14:54:33 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=173.71.218.250; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf NNTP-Posting-Host: 173.71.218.250 References: <60f20df9-4b33-4f29-829e-2fccb89a650a@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <38a501d0-32c2-4d97-ae7c-e32c1ea48ff7@googlegroups.com> Subject: Re: expression functions and raise expressions From: Jere Injection-Date: Sat, 03 Mar 2018 22:54:34 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 2130 X-Received-Body-CRC: 2652456704 Xref: reader02.eternal-september.org comp.lang.ada:50812 Date: 2018-03-03T14:54:33-08:00 List-Id: On Saturday, March 3, 2018 at 3:54:06 PM UTC-5, Simon Wright wrote: > Jere writes: > > > GNAT GPL 2017 accepts it, but FSF GNAT 7.2 for mingw64 on Win10 > > gives some errors: > > test.ads:328:11: (Ada 2005) cannot copy object of a limited type (RM-2005 6.5(5.5/2)) > > test.ads:328:11: return by reference not permitted in Ada 2005 > > > > NOTE: Reference_Type is untagged limited discriminated null > > record with Implicit_Dereference defined. Also note that a similar > > function that returns an aggregate initialization compiles fine > > on both versions. > > > > I am compiling with Ada2012 mode (-gnat12 option) > > > > I believe this to be a bug in GCC 7.2 for mingw64, but wanted to > > make sure I wasn't misreading the RM. > > It's fixed in GCC 8. > > It fails in the same way as 7.1.0, same weird error message about 2005, > with GNAT GPL 2016. > > (macOS High Sierra) Ok, thanks for the confirmation. I worked around it, but it definitely caught me offguard.