comp.lang.ada
 help / color / mirror / Atom feed
From: Anh Vo <anhvofrcaus@gmail.com>
Subject: Re: GNAT doing macro-expansion? (Pre/Post conditions)
Date: Wed, 24 Oct 2012 11:16:26 -0700 (PDT)
Date: 2012-10-24T11:16:26-07:00	[thread overview]
Message-ID: <4c21694e-456d-442f-9d57-da24ad8028bf@googlegroups.com> (raw)
In-Reply-To: <op.wmo04iojule2fv@cardamome>

On Wednesday, October 24, 2012 10:20:36 AM UTC-7, Hibou57 (Yannick Duchêne) wrote:
> Le Wed, 24 Oct 2012 18:45:27 +0200, Yannick Duchêne (Hibou57) <yannick_duchene@yahoo.fr> a écrit: > Le Wed, 24 Oct 2012 18:40:58 +0200, Yannick Duchêne (Hibou57) > <yannick_duchene@yahoo.fr> a écrit: > >> same snippet. Obviously, this does not stand for the reliable > Read “does not stand for the real thing”. > >> 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, then 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, with an added representation clause: type A_Type is mod 256; for A_Type'Size use 16; The module is still 256, but now the size changed, and the bug is not exposed.>>


You should file bug report for these problems. So far, I have filed two bug reports at report@gnat.com when using GNAT-GPL-2012 to compile Ada 2012 codes.



  reply	other threads:[~2012-10-24 18:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-18 23:44 GNAT doing macro‑expansion for generics? (Pre/Post conditions) Yannick Duchêne (Hibou57)
2012-10-19  0:08 ` GNAT doing macro‑expansion? " Yannick Duchêne (Hibou57)
2012-10-24 16:40 ` Yannick Duchêne (Hibou57)
2012-10-24 16:45   ` Yannick Duchêne (Hibou57)
2012-10-24 17:20     ` Yannick Duchêne (Hibou57)
2012-10-24 18:16       ` Anh Vo [this message]
2012-10-24 18:43         ` GNAT doing macro-expansion? " Yannick Duchêne (Hibou57)
2012-10-24 18:53           ` Simon Wright
2012-10-24 19:02             ` Yannick Duchêne (Hibou57)
2012-10-24 21:43               ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox