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.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,27db9c02e8783e58 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Received: by 10.180.107.167 with SMTP id hd7mr74538wib.0.1343341861741; Thu, 26 Jul 2012 15:31:01 -0700 (PDT) Received: by 10.224.138.146 with SMTP id a18mr1314022qau.6.1343312950438; Thu, 26 Jul 2012 07:29:10 -0700 (PDT) Received: by 10.66.72.165 with SMTP id e5mr1607819pav.4.1343312950200; Thu, 26 Jul 2012 07:29:10 -0700 (PDT) Path: ge7ni81112325wib.0!nntp.google.com!volia.net!news2.volia.net!feed-C.news.volia.net!y14no8467254qaj.0!news-out.google.com!a15ni113198934qag.0!nntp.google.com!q21no48509qas.0!news-out.google.com!b9ni64781483pbl.0!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!novia!feeder3.cambriumusenet.nl!feed.tweaknews.nl!94.232.116.13.MISMATCH!feed.xsnews.nl!border-3.ams.xsnews.nl!newsfeed.straub-nv.de!news.antakira.com!weretis.net!feeder1.news.weretis.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: =?ISO-8859-15?Q?Markus_Sch=F6pflin?= Newsgroups: comp.lang.ada Subject: Re: Differences in finalization of controlled objects between gcc 4.6 and gcc 4.7 Date: Thu, 19 Jul 2012 15:59:14 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <50080f7b$0$9525$9b4e6d93@newsspool1.arcor-online.net> NNTP-Posting-Host: MdpKeRr+sx3LK7JQiK5aNw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20120713 Thunderbird/14.0 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit Date: 2012-07-19T15:59:14+02:00 List-Id: Am 19.07.2012 15:45, schrieb Georg Bauhaus: > On 19.07.12 14:23, Markus Sch�pflin wrote: >> Is there a way to have the objects created in place directly in the array? > > Can you make the type limited? No, I need to be able to copy them around. But IMHO that shouldn't make a difference in this case, the compiler should be able to figure out that it can construct the objects in place, shouldn't it? Surprisingly (at least for me) it *does* make a difference when I define T as type T is new ADA.FINALIZATION.LIMITED_CONTROLLED with null record; Then the output looks like this with both versions of gcc: > ./test_ctrl BFBE03D4: I BFBE03D8: I BFBE03D8: F BFBE03D4: F Regards, Markus