Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site unm-cvax.UUCP Path: utzoo!linus!decvax!ittvax!dcdwest!sdcsvax!sdcrdcf!hplabs!hao!seismo!cmcl2!lanl-a!unm-cvax!janney From: janney@unm-cvax.UUCP Newsgroups: net.lang.c Subject: enums again Message-ID: <1000@unm-cvax.UUCP> Date: Fri, 6-Jul-84 22:50:39 EDT Article-I.D.: unm-cvax.1000 Posted: Fri Jul 6 22:50:39 1984 Date-Received: Sun, 8-Jul-84 09:02:56 EDT Organization: Univ. of New Mexico, Albuquerque Lines: 33 I appreciate that you can't do arithmetic with enums, and I've learned to live with not using them in switch statements, but I really thought the following program would be OK: enum foo { one, two, three }; set(now) enum foo *now; { *now = one; } main() { enum foo here; set(&here); } When I gave this to lint, I got enums.c: set, arg. 1 used inconsistently enums.c(5) :: enums.c(13) Can anyone explain this? (This is on 4.2bsd, if it matters). The same problem occurs with arrays of enums. Flame: lint and enums seem to be mutually exclusive, and if I'm forced to choose, I'll stay with lint. Can you do anything with enums, other than assignment? Jim Janney {{convex,ucbvax,gatech}!unmvax, {purdue,lbl-csam,cmcl2}!lanl-a}!unm-cvax!janney