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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6339fea48a1b8cda X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Thu, 12 Jun 2008 20:41:37 +0200 From: =?ISO-8859-1?Q?Markus_Sch=F6pflin?= User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Enumeration representation clause surprise. References: <0cbb6daf-01e9-40f5-855c-4f1d45cb0096@m73g2000hsh.googlegroups.com> <87abhs6qyj.fsf@willow.rfc1149.net> <55613982-679e-419d-8656-03b549393289@w4g2000prd.googlegroups.com> <871w346k4j.fsf@willow.rfc1149.net> <4a84770f-e273-41ad-a8ef-f22a9896b544@i36g2000prf.googlegroups.com> <48502e38$0$23821$4f793bc4@news.tdc.fi> <0d642988-cb65-412d-88b2-806e1a5b0ff3@34g2000hsh.googlegroups.com> In-Reply-To: <0d642988-cb65-412d-88b2-806e1a5b0ff3@34g2000hsh.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <48516de5$0$7547$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 12 Jun 2008 20:41:41 CEST NNTP-Posting-Host: 554b1f42.newsspool1.arcor-online.net X-Trace: DXC=]RgI54l2oeA0YVY]kmLTlDic==]BZ:afN4Fo<]lROoRA<`=YMgDjhgB@84lG4DcooJ5A\JAZH@ag?\>N4X[ZJhX0DO6H@]@IhYLISS` Mike Silva schrieb: > On Jun 12, 4:45 am, Markus Schoepflin 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