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: a07f3367d7,65b902127ca8a604 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news1.google.com!news.glorb.com!feeder.erje.net!news2.arglkargh.de!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Issue with GNAT GPL 2009 and GtkAda Date: Thu, 25 Jun 2009 15:49:58 -0500 Organization: Jacob Sparre Andersen Message-ID: References: <4A414EBB.8060204@free.fr> <1avd65rn49abv$.krcxo2gdzb16$.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1245963039 13764 69.95.181.76 (25 Jun 2009 20:50:39 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 25 Jun 2009 20:50:39 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-RFC2646: Format=Flowed; Original Xref: g2news2.google.com comp.lang.ada:6621 Date: 2009-06-25T15:49:58-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:1avd65rn49abv$.krcxo2gdzb16$.dlg@40tude.net... ... > Yes, but that is not necessarily a compiler bug. It is quite simple to > create a serious problem to oneself: > > declare > Ptr : access T := new T; > begin Allocators of anonymous access types are almost never what you want. This is so true, in fact, that we have proposed a Restriction for this "No_Anonymous_Allocators", which I recommend is part of every program. (Of course, that will have to wait until compilers implement it; it wasn't formally proposed until 3 weeks ago, but it was accepted at the Brest meeting and thus will appear in the next working draft). The next version of Janus/Ada will print out a warning for any anonymous allocator (the restriction would turn it into an error, of course). Randy.