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 Path: g2news1.google.com!news1.google.com!postnews.google.com!y21g2000hsf.googlegroups.com!not-for-mail From: christoph.grein@eurocopter.com Newsgroups: comp.lang.ada Subject: Re: Enumeration representation clause surprise. Date: Fri, 13 Jun 2008 01:27:07 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <770ae1af-b9fd-4c8a-915c-a5cb3ea8fc81@c65g2000hsa.googlegroups.com> <87hcbybazk.fsf@willow.rfc1149.net> NNTP-Posting-Host: 80.156.44.178 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1213345627 5928 127.0.0.1 (13 Jun 2008 08:27:07 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 13 Jun 2008 08:27:07 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: y21g2000hsf.googlegroups.com; posting-host=80.156.44.178; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1),gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 webwasher (Webwasher 6.7.0.3295) Xref: g2news1.google.com comp.lang.ada:688 Date: 2008-06-13T01:27:07-07:00 List-Id: > > With the proposed patch, it gives: > > > GNAT 4.4.0 20080611 (experimental) > > =A0 =A0 26. =A0 =A0 =A0 =A0 X1 at 0 range 0 .. -1; =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 -- Minus 1 !! > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| > > =A0 =A0 =A0 =A0 >>> warning: component representation will be biased > > So what would the value of the bias be? type X_Type is ( X ); for x_type use (x =3D> 16#7FFF_FFFF#); 16#7FFF_FFFF# of course Since this is the only value, nothing need be stored to know which value it is. This is like a constant in ROM, I gather.