lint bug or bad syntax?
throopw at dg_rtp.UUCP
throopw at dg_rtp.UUCP
Mon Feb 3 10:10:52 AEST 1986
> At a guess, lint doesn't parse much but instead does lots of lexxing.
Say what? The lint utility must parse just as much as a compiler... in
just what sense does a typechecker parse "less" than it lexes?
In any event, this is indeed a bug in lint (or so I assert). The
expression ((void)f(),(void)g()) provokes no message, but
(void)((void)f(),g()) causes a warning about the value of g being
ignored. Clearly, g's value is explicitly being ignored in both cases.
In general, lint's opinions about side effects, lack thereof, and what
constitutes "use" of a value are less useful then they ought to be.
Unfortunately, the upshot for your case seems to be that there isn't a
clean way to get lint to accept your construct.
--
Wayne Throop at Data General, RTP, NC
<the-known-world>!mcnc!rti-sel!dg_rtp!throopw
More information about the Comp.lang.c
mailing list