comp.lang.ada
 help / color / mirror / Atom feed
From: "Markus Schöpflin" <nospam@nospam.org>
Subject: Re: Enumeration representation clause surprise.
Date: Thu, 12 Jun 2008 20:41:37 +0200
Date: 2008-06-12T20:41:41+02:00	[thread overview]
Message-ID: <48516de5$0$7547$9b4e6d93@newsspool1.arcor-online.net> (raw)
In-Reply-To: <0d642988-cb65-412d-88b2-806e1a5b0ff3@34g2000hsh.googlegroups.com>

Mike Silva schrieb:
> On Jun 12, 4:45 am, Markus Schoepflin <nos...@no.spam> wrote:
>> Both GNAT and Dec Ada return 1 and 2 for both A1 and A2, so they are
>> correctly debiasing when explicitly asked for the internal representation.
>>
>> Markus
> 
> Now I'm really confused.  In your OP you showed some "incorrect"
> binary values - how did you get those values?  By inspecting memory?

Yes.

> Now you talk about explicitly asking for the internal representation.
> What does that mean exactly?

Using unchecked conversion to ask for the value of the variables.

> Are you saying now that there's no problem after all?

Not at all. The memory layout of the variables is not what I expect it 
to be, because the compiler silently biased those values. The compiler 
is perfectly aware of this, as it makes up for the biasing when 
explicitly querying the value, but this doesn't help at all because I'm 
interested in the exact bitwise representation.

Admittedly, there is an inconsistency in what I'm asking the compiler to 
do, but that's the whole point: I do not want this inconsistency to be 
silently 'fixed' by the compiler, I want to get noted about my error to 
get a chance and fix it myself.

> Mike

Regards,
Markus



  reply	other threads:[~2008-06-12 18:41 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-11 11:38 Enumeration representation clause surprise Markus Schoepflin
2008-06-11 12:30 ` christoph.grein
2008-06-11 12:56   ` Markus Schoepflin
2008-06-11 13:08     ` christoph.grein
2008-06-11 13:28     ` Samuel Tardieu
2008-06-11 13:48       ` Markus Schoepflin
2008-06-11 13:56         ` Samuel Tardieu
2008-06-11 14:58       ` Adam Beneschan
2008-06-11 15:23         ` Markus Schoepflin
2008-06-12  2:37           ` Randy Brukardt
2008-06-12  2:37           ` Randy Brukardt
2008-06-11 15:56         ` Samuel Tardieu
2008-06-11 19:10           ` Adam Beneschan
2008-06-11 19:59             ` Niklas Holsti
2008-06-12  1:16               ` tmoran
2008-06-12  8:27                 ` christoph.grein
2008-06-12  8:45               ` Markus Schoepflin
2008-06-12 16:43                 ` Mike Silva
2008-06-12 18:41                   ` Markus Schöpflin [this message]
2008-06-12 20:10                     ` Mike Silva
2008-06-12 20:52                       ` Simon Wright
2008-06-12 23:36                         ` Mike Silva
2008-06-13  5:49                           ` Simon Wright
2008-06-13  7:21                       ` Keith Thompson
2008-06-13 13:31                         ` Mike Silva
2008-06-13 14:45                           ` Markus Schoepflin
2008-06-13 17:52                           ` Keith Thompson
2008-06-13  9:14                       ` Jean-Pierre Rosen
2008-06-12 19:05 ` richtmyer
2008-06-12 21:26   ` Samuel Tardieu
2008-06-12 22:42     ` Adam Beneschan
2008-06-13  7:11       ` Samuel Tardieu
2008-06-13  8:27       ` christoph.grein
2008-06-13 16:21         ` Adam Beneschan
2008-06-15 19:33           ` Robert A Duff
2008-06-16 14:50             ` Adam Beneschan
2008-06-16 19:18               ` Robert A Duff
2008-06-17  6:03               ` christoph.grein
2008-06-17  7:22                 ` christoph.grein
2008-06-13  8:24     ` Peter Hermann
2008-06-13 14:47       ` Samuel Tardieu
2008-06-14 11:48         ` John B. Matthews
replies disabled

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