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.3 required=5.0 tests=BAYES_00,FORGED_YAHOO_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,aba1514f4a1fc450 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Received: by 10.66.74.102 with SMTP id s6mr1138948pav.21.1345990284823; Sun, 26 Aug 2012 07:11:24 -0700 (PDT) Path: t10ni62970945pbh.0!nntp.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.snarked.org!newsfeed.news.ucla.edu!ihnp4.UCSD.Edu!nntp.ucr.edu!usenet.stanford.edu!postnews.google.com!cf4g2000vbb.googlegroups.com!not-for-mail From: Michael S Newsgroups: comp.arch,comp.lang.ada Subject: Re: Have the Itanium critics all been proven wrong? Date: Wed, 22 Aug 2012 08:59:08 -0700 (PDT) Organization: http://groups.google.com Message-ID: <793f28d5-8d61-48e7-adc8-266356cecd26@cf4g2000vbb.googlegroups.com> References: <5021874F.1747D0BF@sonic.net> <46f19bfc-930e-4f06-b5a6-c60f39cfda0c@p14g2000yqk.googlegroups.com> <077b12f6-1196-4b5c-bbdb-04291b1ae616@q22g2000vbx.googlegroups.com> <589825d2-d998-456a-9c37-c8ae13e1e7bc@e29g2000vbm.googlegroups.com> NNTP-Posting-Host: 62.219.244.2 Mime-Version: 1.0 X-Trace: posting.google.com 1345651148 6057 127.0.0.1 (22 Aug 2012 15:59:08 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 22 Aug 2012 15:59:08 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: cf4g2000vbb.googlegroups.com; posting-host=62.219.244.2; posting-account=yxhsVAkAAAAd1ExczpaZ2Ptm4WnXJOwS User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20100101 Firefox/11.0,gzip(gfe) X-Received-Bytes: 3705 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-08-22T08:59:08-07:00 List-Id: On Aug 22, 6:06=A0pm, Brian Drummond wrote: > On Wed, 22 Aug 2012 07:00:31 -0700, Michael S wrote: > > On Aug 22, 3:39=A0pm, Brian Drummond wrote: > >> On Wed, 22 Aug 2012 03:32:00 -0700, Michael S wrote: > > [... discussion of private types exported to module A from B] > > >> This puts B in charge of the object lifetimes; if A wants to access a > >> stale object, expect an exception. > > > Exception, if I am lucky. > > If I am less lucky, the physical place of old auto object is now > > occupied by new auto object of the same or compatible type and the call > > to accessor caused silent corruption. > > If a module has exported a pointer to an "auto object" then the > accessibility checks have been circumvented by unchecked_access or > unchecked_conversion. In which case ... yes, caveat programmer! > My knowledge of Ada is rather rusty :( Is it correct to say that applying 'access attribute to auto objects is a syntax error and that the only possible way of getting access to such objects is by applying 'unchecked_access attribute? Thinking about it, it makes sense. 99% of cases of passing pointers to auto object as parameters in C are not because programmer really wants to pass pointer, but because of absence of 'out' and 'in out' modes and due to inefficiency of passing of big objects in C language equivalent of 'in' mode. Also nearly 100% of uses of pointers to auto object in the local context are due to [by now quite often false] programmer's believe that he can optimize better than optimizing compiler.