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: 103376,2478ea1b71f848e3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.66.75.230 with SMTP id f6mr3166347paw.25.1351104236314; Wed, 24 Oct 2012 11:43:56 -0700 (PDT) Path: 6ni21182pbd.1!nntp.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!news.glorb.com!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: GNAT doing macro-expansion? (Pre/Post conditions) Date: Wed, 24 Oct 2012 20:43:52 +0200 Organization: Ada @ Home Message-ID: References: <4c21694e-456d-442f-9d57-da24ad8028bf@googlegroups.com> NNTP-Posting-Host: qMb93YQAAEXAn86i0hBe/g.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.02 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 X-Received-Bytes: 3649 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2012-10-24T20:43:52+02:00 List-Id: Le Wed, 24 Oct 2012 20:16:26 +0200, Anh Vo a =C3= =A9crit: > On Wednesday, October 24, 2012 10:20:36 AM UTC-7, Hibou57 (Yannick = > Duch=C3=AAne) wrote: >> Le Wed, 24 Oct 2012 18:45:27 +0200, Yannick Duch=C3=AAne (Hibou57) = >> a =C3=A9crit: > Le Wed, 24 Oct 2012 18:40:= 58 = >> +0200, Yannick Duch=C3=AAne (Hibou57) > a = =C3=A9crit: = >> > >> same snippet. Obviously, this does not stand for the reliable > = = >> Read =E2=80=9Cdoes not stand for the real thing=E2=80=9D. > >> type A= _Type is mod 256; = >> > > Sorry, forget to say about a second variation: replace the above = = >> with > `type A_Type is new Positive;` and there will be no more error= = >> at > runtime (the first error, that is, with the useless package body= = >> still > there). That one is a lot weird. > More on that particular = >> point. I you change `mod 256` into anything the modulo is above 256, = = >> not necessarily a power of two, as this works with `mod 257` two, the= n = >> the bug disappears. The bug is there for any value below and included= , = >> 256. I suspected the element size, and indeed, that's not really the = = >> modulo, but the size. Replace `type A_Type is mod 256;` with this, wi= th = >> an added representation clause: type A_Type is mod 256; for A_Type'Si= ze = >> use 16; The module is still 256, but now the size changed, and the bu= g = >> is not exposed.>> > > > You should file bug report for these problems. So far, I have filed tw= o = > bug reports at report@gnat.com when using GNAT-GPL-2012 to compile Ada= = > 2012 codes. But I'm not an AdaCore client, so I believe this would be useless. I use= = to send them bug reports, but they always underlined there's no warranty= = it will be taken into account, as as=E2=80=91understandably, their clien= ts comes = first, and are already source of supported support requests. That said, I may compile the snippets into a bug report to them, later, = if = ever that may be useful to them and their clients, but I feel to guess = their clients are less interested in Ada 2012's predicates than I am, an= d = seems to favor Ada 95 and Ada 2005 (or am I wrong?). Also, the cases are even more tricky than I first believed, I've noticed= = some other new things (should I post these or not?). -- = =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