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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,461d464a39a7a30a X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 X-Received: by 10.66.251.132 with SMTP id zk4mr5621252pac.44.1367665342958; Sat, 04 May 2013 04:02:22 -0700 (PDT) Path: bp1ni1519pbd.1!nntp.google.com!npeer01.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!newsfeed.news.ucla.edu!nrc-news.nrc.ca!News.Dal.Ca!news.litech.org!news.etla.org!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: =?utf-8?B?R05BVCBub3QgZ2VuZXJhdGluZyBhbnkgY29kZSBmb3Igc3Vi4oCRcHJvZ3I=?= =?utf-8?B?YW06IGtub3duIGJ1Zz8=?= Date: Sun, 28 Apr 2013 21:27:22 +0200 Organization: Ada @ Home Message-ID: References: NNTP-Posting-Host: ZXqOjp+NNxswgqXUj66j5g.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.15 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 X-Received-Bytes: 3497 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2013-04-28T21:27:22+02:00 List-Id: Le Sun, 28 Apr 2013 19:52:18 +0200, Yannick Duch=C3=AAne (Hibou57) = a =C3=A9crit: > I still feel that looks like a compiler bug (GCC's fault or GNAT's = > fault?). That's me who bugged and that's my fault :D Explanations with two points. 1) In the archive linked in this thread, if I change `Volatile =3D> Fals= e` = into `Volatile =3D> True`, it works, without even a need to use `Clobber= `. = Thus, the initial case is solved. 2) In a later message I tried something else, with `Volatile =3D> True`,= = this did not work neither as I said, while it should have work. That was= = because something else also changed: the package specification hold a = `pragma Pure;` and that was wrong [1]. I changed `pragma Pure;` into = `pragma Preelaborate;` and it now works as expected. [1]: http://www.ada-auth.org/standards/12rm/html/RM-10-2-1.html#p18 > If a library unit is declared pure, then the implementationis permitte= d = > to omit a call on a library-level subprogramof the library unit if the= = > results are not needed after thecall. In addition, the implementation = = > may omit a call on sucha subprogram and simply reuse the results = > produced by an earliercall on the same subprogram, provided that [=E2=80= =A6] That's a quoted from =E2=80=9CImplementation permissions=E2=80=9D, and I= forget it. Well, = honestly, I believe this should part of the semantic. If you read the = semantic part (above), which is what I typically focus on, nothing there= = implies or even suggest this implementation permission. The semantic par= t = should have an explicit reference to side effects, and not just = elaboration. By the way, the whole page is titled =E2=80=9CElaboration C= ontrol=E2=80=9D, = not =E2=80=9CSub=E2=80=91program invocation semantic=E2=80=9D. It's unli= kely someone will search = in elaboration control to learn about sub=E2=80=91program call semantic,= these are = two different things. Well, that's a personal opinion, and I may be wron= g = with it (if so, please, tell me why). -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity