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!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: expression functions and raise expressions Date: Sat, 03 Mar 2018 20:54:04 +0000 Organization: A noiseless patient Spider Message-ID: References: <60f20df9-4b33-4f29-829e-2fccb89a650a@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="b9700e714b8543926d593b241dd35002"; logging-data="17653"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19z+QvJTmlEywbwZ5HDDJoB1q7avLyT1UU=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:37/2KDXjmz0KlyiVSMeE16C4kvM= sha1:a1fYiETDldw7i8IB6I+xXikHUvc= Xref: reader02.eternal-september.org comp.lang.ada:50810 Date: 2018-03-03T20:54:04+00:00 List-Id: 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)