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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,514627f9964b6e38 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Using the GNAT defined attribute: 'Enum_Rep Date: 1997/09/09 Message-ID: #1/1 X-Deja-AN: 271002646 References: <97082719523509@psavax.pwfl.com> <34147DAB.463@pseserv3.fw.hac.com> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-09-09T00:00:00+00:00 List-Id: In article , Matthew Heaney wrote: >Again, the RM does define internal representation, in RM95 13.4 (8). See >also paragraph 8a in the AARM. Ah yes, I had forgotten about that paragraph. Sorry for the misinformation. By the way, if I were designing a language from scratch, I would say that the compiler can do whatever it likes in the absence of rep clauses. But I would provide an easy way to say you want the "obvious" representation (which is (0, 1, 2, ...) for enums). The problem with Ada 83 was that you had to write a whole bunch of stuff to say you want what you would get anyway, which is why 13.4(8) exists. That problem still exists for record_rep_clauses, for example, although "pragma Convention(C);" comes close to what I want, here. - Bob