Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!wuarchive!brutus.cs.uiuc.edu!apple!mips!ardent!jra!jss From: jss@jra.ardent.com Newsgroups: comp.lang.c++ Subject: Re: const enums -- Lawyers opinions?? Keywords: const, enum Message-ID: <9925@ardent.UUCP> Date: 9 Jan 90 22:26:34 GMT References: <963@rna.UUCP> <10197@microsoft.UUCP> Sender: news@ardent.UUCP Reply-To: jss@jra.ardent.com () Organization: Ardent Computer Corp., Sunnyvale, CA Lines: 18 In article <10197@microsoft.UUCP> jimad@microsoft.UUCP (JAMES ADCOCK) writes: > >cfront 2.0 accepts this with the appropriate warning that you're assigning >an int to an enum -- when you or individual bits together you end up with >values not in the set original defined in the bits enum -- so how can the >receiver of the or results be a "bits" ? > The question of what an enum type "really is", has bedeveled the concept ever since it was introduced into C. Over the years a lot has been said, but I believe a consensus finally emerged and both ANSI C and the most recent C++ reference manual agree that they are integral types. This means that its perfectly sensible to assign arbitrary integer values to variables of enum type. Jerry Schwarz