🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1219

Re: space optimization involving enum

#1219
From: dave
Date: Wed, 26 Aug 1992 19:33
29 lines
1335 bytes
            <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"
Technical Details
Message-ID: <19920826.124331.137@almaden.ibm.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!vnet.ibm.com
References: <spuler.714711530@coral.cs.jcu.edu.au> <1992Aug25.153909.17977@email.tuwien.ac.at> <17dvn3INNglh@early-bird.think.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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