home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.std.c
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!convex!seas.smu.edu!utacfd.uta.edu!rwsys!sneaky!gordon
- From: gordon@sneaky.lonestar.org (Gordon Burditt)
- Subject: Re: space optimization involving enum
- Message-ID: <1992Aug26.222505.7496@sneaky.lonestar.org>
- Organization: Gordon Burditt
- References: <spuler.714711530@coral.cs.jcu.edu.au> <1992Aug25.160905.9177@sq.sq.com>
- Date: Wed, 26 Aug 1992 22:25:05 GMT
- Lines: 16
-
- >In section 3.1.2.5 (ANSI numbering, 6.1.2.5 in ISO edition) standard
- >specifies in effect that all integral types, including enums, have the
- >same representation.
-
- So far, so good.
-
- > The representation of 10000 has to use the bit
- >sequence 10011100010000.
-
- As I read it, wrong. Nothing I see prevents use of 2's complement,
- 1's complement, or excess-2**(n-1) (the sign bit being reversed from
- 2's complement). However, it has to be used consistently on integral
- types.
-
- Gordon L. Burditt
- sneaky.lonestar.org!gordon
-