enums again
janney at unm-cvax.UUCP
janney at unm-cvax.UUCP
Sat Jul 7 12:50:39 AEST 1984
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
More information about the Comp.lang.c
mailing list