Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!ginosko!aplcen!haven!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: Declarations in switches, errors
Message-ID: <11158@smoke.BRL.MIL>
Date: 28 Sep 89 01:55:28 GMT
References: <561@crdos1.crd.ge.COM>
Reply-To: gwyn@brl.arpa (Doug Gwyn)
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 13

In article <561@crdos1.crd.ge.COM> davidsen@crdos1.UUCP (bill davidsen) writes:
>I submit that executing a switch statement constitutes "normal entry"
>and that the initialization should be performed before evaluating the
>switch variable. Would any of the people still on X3J11 like to comment?

No, the block is the controlled part of the switch and it is entered
via a case or default label, not sequentially starting at the block
beginning.  Declarations before the first label are valid, but no
auto initialization is performed since execution does not "plow
through" the declarations but instead bypasses them.

The above is my understanding of what is supposed to be going on in
a switch statement; my X3J11 notes are elsewhere at the moment.