Re: [PATCH] linux/signal.h siginit*() optimization

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Fri, 2 Jul 1999 20:41:36 +0200


Tom Leete wrote:
> Thanks to several for pointing this out to me. One correspondent said that a
> break statement is required by some compilers before exiting the switch
> block by any branch. Is this in the standard?

I don't understand what you're asking. If you're asking "will a case
with no break at the end exit the switch or fall through to the next
case?" the answer is it will fall through unless it's the last one.
Then it'll exit the switch.

Some consider this a dubious side of the C language.
It's considered dubious style to miss out the last break BTW.
For those times when people add new cases at the end.

> The patch remains good, despite my aberrent reasoning. It fixes the problem
> noted by Ronnie Misra. Is there a reason to prefer the unconventional order
> of cases in these functions?

I prefer it :-)

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/