home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / std / c / 2519 < prev    next >
Encoding:
Internet Message Format  |  1992-08-26  |  1.3 KB

  1. Path: sparky!uunet!vnet.ibm.com
  2. From: dmm@vnet.ibm.com (dave)
  3. Message-ID: <19920826.124331.137@almaden.ibm.com>
  4. Date: Wed, 26 Aug 92 15:33:47 EDT
  5. Newsgroups: comp.std.c
  6. Subject: Re: space optimization involving enum
  7. Organization: IBM Canada Lab
  8. News-Software: UReply 3.0
  9. X-X-From: dmm@vnet.ibm.com (Dave Mooney)
  10. References: <spuler.714711530@coral.cs.jcu.edu.au> <1992Aug25.153909.17977@email.tuwien.ac.at> <17dvn3INNglh@early-bird.think.com>
  11. Lines: 29
  12.  
  13.             <1992Aug26.184220.8236@taumet.com>
  14.  
  15. In <1992Aug26.184220.8236@taumet.com> Steve Clamage writes:
  16. >                                                If enums are smaller
  17. > than ints, avoid those too.
  18.  
  19. That means that given
  20.  
  21.   enum c { red, green, blue };
  22.   int f( x ) enum c x; { }
  23.  
  24. there is no strictly-conforming way to write a parameter-list prototype
  25. for the function f.
  26.  
  27.   int f( int );
  28.  
  29. would be right if  enum c  were of short or char size.  If  enum c  were
  30. of int or long size, then
  31.  
  32.   int f( enum c );
  33.  
  34. would be the prototype, right?
  35.  
  36. dave
  37.  
  38. -------------------------------------------------------------------------
  39. Dave Mooney                                              dmm@vnet.ibm.com
  40.  C Set/2 Development, IBM Canada Lab, 844 Don Mills Rd, Toronto, Ontario
  41.             "If you've got a blacklist, I want to be on it"
  42.