home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!vnet.ibm.com
- From: dmm@vnet.ibm.com (dave)
- Message-ID: <19920826.124331.137@almaden.ibm.com>
- Date: Wed, 26 Aug 92 15:33:47 EDT
- Newsgroups: comp.std.c
- Subject: Re: space optimization involving enum
- Organization: IBM Canada Lab
- News-Software: UReply 3.0
- X-X-From: dmm@vnet.ibm.com (Dave Mooney)
- References: <spuler.714711530@coral.cs.jcu.edu.au> <1992Aug25.153909.17977@email.tuwien.ac.at> <17dvn3INNglh@early-bird.think.com>
- Lines: 29
-
- <1992Aug26.184220.8236@taumet.com>
-
- In <1992Aug26.184220.8236@taumet.com> Steve Clamage writes:
- > If enums are smaller
- > than ints, avoid those too.
-
- That means that given
-
- enum c { red, green, blue };
- int f( x ) enum c x; { }
-
- there is no strictly-conforming way to write a parameter-list prototype
- for the function f.
-
- int f( int );
-
- would be right if enum c were of short or char size. If enum c were
- of int or long size, then
-
- int f( enum c );
-
- would be the prototype, right?
-
- dave
-
- -------------------------------------------------------------------------
- Dave Mooney dmm@vnet.ibm.com
- C Set/2 Development, IBM Canada Lab, 844 Don Mills Rd, Toronto, Ontario
- "If you've got a blacklist, I want to be on it"
-