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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,64fe8f87aae99538 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!e6g2000prf.googlegroups.com!not-for-mail From: Anh Vo Newsgroups: comp.lang.ada Subject: Re: How to return an empty aggregate Date: Tue, 1 Apr 2008 05:54:00 -0700 (PDT) Organization: http://groups.google.com Message-ID: <69046060-8641-4e6b-95a9-232c6a8059ba@e6g2000prf.googlegroups.com> References: NNTP-Posting-Host: 69.232.203.70 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1207054440 29676 127.0.0.1 (1 Apr 2008 12:54:00 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 1 Apr 2008 12:54:00 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e6g2000prf.googlegroups.com; posting-host=69.232.203.70; posting-account=Qh2kiQoAAADpCLlhT_KTYoGO8dU3n4I6 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; InfoPath.2),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20715 Date: 2008-04-01T05:54:00-07:00 List-Id: On Apr 1, 4:58=A0am, Maciej Sobczak wrote: > In my previous post I had the following: > > =A0 =A0 =A0 type Concrete is new Middle with null record; > > =A0 =A0 =A0 function Make_Concrete return Concrete is > =A0 =A0 =A0 =A0 =A0C : Concrete; > =A0 =A0 =A0 begin > =A0 =A0 =A0 =A0 =A0return C; > =A0 =A0 =A0 end Make_Concrete; > > I would like to return the empty(?) aggregate instead of the dummy > local variable. > Is there a way to do this? > > The following: > > =A0 =A0 =A0 =A0 return Concrete' (others =3D> <>); > > results in segmentation fault on my system (compiler version as > before). > Did you get seg fault during run time or the compiler crashed with seg fault? By the way, the return statement should be flagged as syntax error due to missing the base type Middle. > Extended return with null statement works fine, but I would like to > understand the language corners involved with the aggregate. This must me the compiler bug. The program should behave the same way. AV