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,5d4ade2fd8fd67c6 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!aioe.org!news.tornevall.net!news.jacob-sparre.dk!pnx.dk!jacob-sparre.dk!ada-dk.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Legit Warnings or not Date: Tue, 26 Jul 2011 16:32:08 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <531193e0-3305-4292-9ed8-0176226c1d00@x12g2000yql.googlegroups.com> <1rx6dwrxmc81p.eazb4fjqztox$.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1311715931 27562 69.95.181.76 (26 Jul 2011 21:32:11 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 26 Jul 2011 21:32:11 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 Xref: g2news2.google.com comp.lang.ada:21345 Date: 2011-07-26T16:32:08-05:00 List-Id: "Robert A Duff" wrote in message news:wccipqtawza.fsf@shell01.TheWorld.com... > "Randy Brukardt" writes: ... >>...because there is no good >> reason not to support this as the default (as noted, some target >> environments might not want such objects, and pragma Restrictions can >> surely >> be used to prevent them from being generated). But apparently, >> implementers >> are lazy enough to avoid it, and customers have never pushed hard enough >> to >> get it added as an option. > > I don't think it was laziness. It was an honest belief that implicit > heap allocation is evil. You'd still have to do that to return unconstrained objects, to declare dynamically sized objects, and probably other things as well. (I realize that some implementations have gone to heroic lengths -- wasting large amounts of address space for an extra stack -- to avoid using heap allocation for that -- but it is essentially the same mechanism, and heap allocations have a decided advantage of not wasting any address space [a critical need on our early 16-bit targets]). So I don't think you can implement Ada without some sort of implicit memory allocation, so I fail to see any good reason to avoid it in this one particular case. And in any case, there is a restriction which would force a compiler to reject any such allocations -- why make life harder for everyone that doesn't need that restriction? Randy.