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!news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.velia.net!noris.net!nntp.ilk.net!not-for-mail From: Markus Schoepflin Newsgroups: comp.lang.ada Subject: Re: Enumeration representation clause surprise. Date: Thu, 12 Jun 2008 10:45:14 +0200 Organization: Customer of ILK Internet GmbH, Karlsruhe, Germany Message-ID: 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> NNTP-Posting-Host: csdc.comsoft.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: nntp.ilk.net 1213260314 10086 212.86.205.70 (12 Jun 2008 08:45:14 GMT) X-Complaints-To: usenet@ilk.net NNTP-Posting-Date: Thu, 12 Jun 2008 08:45:14 +0000 (UTC) User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) In-Reply-To: <48502e38$0$23821$4f793bc4@news.tdc.fi> Xref: g2news1.google.com comp.lang.ada:670 Date: 2008-06-12T10:45:14+02:00 List-Id: Niklas Holsti wrote: > Adam Beneschan wrote: > >> ... technically it may be that >> the RM doesn't require the specified representation to be honored for >> *any* objects, stand-alone or component. At least I couldn't find >> anything specific, unless this is "generally implied" by the whole >> chapter or by 13.1. It may be that it's legal for an implementation >> to accept an enumeration representation clause and then never apply >> it. > > There's a "Note" in RM13.4(11/1) that says "Unchecked_Conversion may be > used to query the internal codes used for an enumeration type". I don't > know if "Notes" are normative parts of the standard. It would be > interesting to know what Unchecked_Conversion gives for the 1-bit record > component in Markus' problematic record. If it gives 0 and 1, as > encoded, and not 1 and 2, as required in the enumeration representation > clause, it would seem to violate this "Note". 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