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 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 19 Sep 92 00:40:35 GMT From: cis.ohio-state.edu!news.sei.cmu.edu!jbg@uunet.uu.net (John Goodenough) Subject: Re: Enumerations Message-ID: <1992Sep19.004035.22312@sei.cmu.edu> List-Id: The one case in which you might expect a compiler to provide a default enumeration representation different from that of the position number is for the predefined type BOOLEAN. My understanding is that on some architectures it can be more efficient to code FALSE as a negative number (e.g., all ones) and TRUE as a non-negative number (e.g., all zeroes). As I recall, it was at least partly for this reason that the LRM did not specify the default representation for enumeration types. Robert Dewar is fond of pointing out (as a way of highlighting the common confusion between an abstract value and its representation) that it should not be considered peculiar that the LRM fails to specify a default representation for enumeration values; it doesn't specify the default representation of integers either! John B. Goodenough Goodenough@sei.cmu.edu Software Engineering Institute 412-268-6391