scl@virginia.acc.virginia.edu (Steve Losen) (12/17/88)
Sorry if this has already been reported... Lint on an AT&T 3b2 running SysV r3.0 behaves inconsistently on this program: ========================= void a() { printf("a\n"); } void b() { printf("b\n"); } main() { void (*emit)(); int i = 1; if (i) emit = a; else emit = b; /* lint buys this */ emit = i ? a : b; /* lint rejects this */ (*emit)(); return(0); } ========================== Evidently lint does not like the combination of the void type and the ?: operator. Lint works fine if I declare everything "int" instead of "void". Anyone have a fix? -- Steve Losen scl@virginia.edu University of Virginia Academic Computing Center