From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,MSGID_SHORT autolearn=no autolearn_force=no version=3.4.5-pre1 Date: 22 Sep 92 14:27:40 GMT From: warlord!gelac!celliott@gatech.edu (Chris Elliott) Subject: Re: Enumerations Message-ID: <570@gelac.lockheed.com> List-Id: In article <9209162110.AA21397@efftoo.boeing.com> crispen@efftoo.boeing.com (cr ispen) writes: >But what I'd like to know is, does anyone know of an Ada compiler >which does not give a machine value of zero for the first element of >an enumeration, one for the second, and so on? > >Just idle curiosity, actually, since it came up in the context of a >document I'm writing that's going to say, "Use rep specs for interface >objects and don't trust different compilers to do the same thing". I don't think the LRM defines the starting machine representation of an enumeration type. The position of that type is defined to start at zero in 3.5.1, even if you use a representation clause. However the position is not necessarily the same as the machine representation. To sum up: If it ain't in the LRM, don't count on it. -Chris Elliott celliott@gelac.lockheed.com -- Chris Elliott - celliott@gelac.lockheed.com