Rules in placement of 'case'-labels

Karl Heuer karl at haddock.ima.isc.com
Fri Oct 19 07:27:40 AEST 1990


In article <808 at tuura.UUCP> risto at tuura.UUCP (Risto Lankinen) writes:
>I've found that the following construct compiles without errors at least
>in Microsoft C version 6.0 [example where case labels are misbalanced with
>respect to braces]...  It also made me wonder whether it is legal in C.

It's legal in both Classic and ANSI C, though some compilers have been known
to reject it.  It's also highly unstructured; use it with the same level of
caution as a `goto'.

Karl W. Z. Heuer (karl at ima.isc.com or uunet!ima!karl), The Walking Lint



More information about the Comp.lang.c mailing list