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,c9d5fc258548b22a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!feeder.news-service.com!2a02:590:1:1::196.MISMATCH!news.teledata-fn.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Fri, 11 Feb 2011 19:52:18 +0100 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: How do I write directly to a memory address? References: <67063a5b-f588-45ea-bf22-ca4ba0196ee6@l11g2000yqb.googlegroups.com> <9a8f406d-05ca-4bf3-8487-918d4e0dd634@o18g2000prh.googlegroups.com> <4d52ee47$0$18057$882e7ee2@usenet-news.net> <4d5306a0$0$18057$882e7ee2@usenet-news.net> <76c123ab-7425-44d8-b26d-b2b41a9aa42b@o7g2000prn.googlegroups.com> <4d5310ab$0$18057$882e7ee2@usenet-news.net> <9bff52ca-6213-41da-8fa4-3a4cdd8086d3@y36g2000pra.googlegroups.com> <4d5315c8$0$18057$882e7ee2@usenet-news.net> <159dca70-2103-46d7-beb2-c7754d30fe36@k15g2000prk.googlegroups.com> <4d53222d$0$18057$882e7ee2@usenet-news.net> <4d540714$0$27423$882e7ee2@usenet-news.net> <4d5423b9$0$27423$882e7ee2@usenet-news.net> <867afa64-090f-48bf-93a3-54ec23b51381@f18g2000yqd.googlegroups.com> <4d555f9a$0$27376$882e7ee2@usenet-news.net> In-Reply-To: <4d555f9a$0$27376$882e7ee2@usenet-news.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <4d558562$0$7651$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 11 Feb 2011 19:52:18 CET NNTP-Posting-Host: 6f3c9110.newsspool1.arcor-online.net X-Trace: DXC=T`Md;LIZ<@V[7Non7UCi8Uic==]BZ:af^4Fo<]lROoRQ<`=YMgDjhgRD>=kX2P@_eVnc\616M64>ZLh>_cHTX3j]oIhkP:;PbW[ X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:17247 Date: 2011-02-11T19:52:18+01:00 List-Id: On 11.02.11 17:10, Hyman Rosen wrote: > On 2/11/2011 3:26 AM, Ludovic Brenta wrote: >> You are wrong because the C program can *also* overflow its stack or >> heap and you *also* have to worry about that, just like in Ada; > > Actually, Ada has the more severe problem here, because Ada > makes it easy to declare objects on the stack which are sized > based on the values of subprogram parameters, while C and C++ > do not. I know I've seen a good number of postings over the > years here on c.l.a. where newbies make this mistake - they'll > declare some local N�N�N matrix and wonder why their program > blows up. The heap is much more forgiving, especially nowadays. Just allocating arrays without thinking about heap or stack is not a mistake, I'd think! Even if several versions of GNAT seem to have this quality of implementation issue. On the other hand, there may be good reasons to manually control memory allocation choices, but they seem to be rather technical. It is sad that they should become idiomatic just because some at AdaCore favor using pointers for larger objects. > You might also ask yourself why, if Ada is so good, is it so > little used? The answer I have heard frequently is that the market was such that some vendors went hoggish, knowing there would be semi-forced buyers.