comp.lang.ada
 help / color / mirror / Atom feed
From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: GNAT doing macro-expansion? (Pre/Post conditions)
Date: Wed, 24 Oct 2012 20:43:52 +0200
Date: 2012-10-24T20:43:52+02:00	[thread overview]
Message-ID: <op.wmo4zetjule2fv@cardamome> (raw)
In-Reply-To: 4c21694e-456d-442f-9d57-da24ad8028bf@googlegroups.com

Le Wed, 24 Oct 2012 20:16:26 +0200, Anh Vo <anhvofrcaus@gmail.com> a écrit:

> 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.

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‑understandably, their clients 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, and  
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?).


-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University



  reply	other threads:[~2012-10-24 18:43 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       ` GNAT doing macro-expansion? " Anh Vo
2012-10-24 18:43         ` Yannick Duchêne (Hibou57) [this message]
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