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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5f9c25380ec58962 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.197.100 with SMTP id it4mr1696918pbc.2.1326750835604; Mon, 16 Jan 2012 13:53:55 -0800 (PST) Path: lh20ni189977pbb.0!nntp.google.com!news2.google.com!postnews.google.com!k10g2000yqk.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Elaboration circularity with generics Date: Mon, 16 Jan 2012 13:52:34 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <583b1bfe-95bd-4669-b16b-c733c81e8f88@w4g2000vbc.googlegroups.com> <1007811599348271064.048391rm-host.bauhaus-maps.arcor.de@news.arcor.de> <9e273746-1663-4fef-9154-f37a25d3c01b@o13g2000vbf.googlegroups.com> <2ffd449a-2eee-4127-8cdb-7c42bcfd9e60@a40g2000vbu.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 X-Trace: posting.google.com 1326750835 7290 127.0.0.1 (16 Jan 2012 21:53:55 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 16 Jan 2012 21:53:55 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k10g2000yqk.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: ARLUEHNKC X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C),gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-01-16T13:52:34-08:00 List-Id: On Jan 16, 1:29=A0pm, Maciej Sobczak wrote: > On Jan 16, 3:34=A0pm, Robert A Duff > wrote: > > > > In such a case I would consider it to be a compiler bug. > > > I don't see any compiler bug here. > > What I'm concerned about is portability. If the compiler is allowed to > refuse my program even though there is no paragraph saying that my > program is illegal, then perhaps some other compiler will compile it > without any trouble. Which means that my program will not be portable, > even though it might not touch any implementation limits or other > similarly valid reasons. The problem is that without any additional Elaborate pragmas, a compiler *could* compile the program, but it would be useless as it would raise Program_Error right away. Another compiler might build the program and choose a different elaboration order that doesn't raise Program_Error. Neither of these compilers would be wrong, since the language doesn't specify the exact elaboration order when there is more than one that obeys the Elaborate pragmas and other language rules. So your program as written isn't portable at all; and even though technically a compiler should accept the program, if you're concerned about portability then you should be grateful that GNAT (in its non-standard mode) rejected the program and alerted you to the portability problem in your code. I don't think you have a legitimate complaint about GNAT here, at least not on portability grounds. -- Adam