Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: Declarations in switches, errors
Message-ID: <11173@smoke.BRL.MIL>
Date: 28 Sep 89 04:42:42 GMT
References: <561@crdos1.crd.ge.COM> <10041@xanth.cs.odu.edu> <1202@virtech.UUCP>
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 15

In article <1202@virtech.UUCP>, cpcahil@virtech.UUCP (Conor P. Cahill) writes:
> If this is the standard, I think it is broken.  If the compiler allows 
> a variable declaration, it should allow an initialization.

If I recall correctly (my copy of the Standard is not at hand), you can
specify the initializer but of course it won't be executed.  Consider
the following analogous case (which does NOT involve "switch") to see why:

	goto label;
	{
		int i = 4;
		foo();
	label:	bar();
		baz();
	}