How do you document breakless cases
Michael T Sullivan
sullivan at vsi.UUCP
Fri Jul 1 09:35:16 AEST 1988
In article <16607 at tut.cis.ohio-state.edu>, lvc at tut.cis.ohio-state.edu (Lawrence V. Cipriani) writes:
> 1 /* fallthrough */
> if the last statement before a case isn't one of
> return
> exit
> abort
> etc.
return is different that exit and abort. Lint knows that return isn't coming
back, wheras exit and abort are just functions. I ran into this the other
day where my switch had all cases and default that returned and one that exited.
Lint complained about the one that exited with a "function has return and
return(e)" type of message. I put a /*NOTREACHED*/ after the exit and lint
was much happier.
--
Michael Sullivan {uunet|attmail}!vsi!sullivan
V-Systems, Inc. Santa Ana, CA sullivan at vsi.com
ons, workstations, workstations, workstations, workstations, workstations, work
More information about the Comp.lang.c
mailing list