Newsgroups: comp.std.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: Declarations in switches, errors Message-ID: <1989Sep30.230408.29547@utzoo.uucp> Organization: U of Toronto Zoology References: <561@crdos1.crd.ge.COM> <11158@smoke.BRL.MIL> <637@crdos1.crd.ge.COM> <1989Sep30.052000.13719@utzoo.uucp> <30540@news.Think.COM> Date: Sat, 30 Sep 89 23:04:08 GMT In article <30540@news.Think.COM> barmar@kulla (Barry Margolin) writes: >...why does the standard permit initializers in declarations at the head >of a switch body, if they are required to be ignored? ... In fact, one can read the C++ Reference Manual (as of Stroustrup's book -- haven't seen the latest one) as forbidding such initializers. While the section on switch has the same old C wording, the section on goto is quite firm that jumping past an initializer is forbidden. -- "Where is D.D. Harriman now, | Henry Spencer at U of Toronto Zoology when we really *need* him?" | uunet!attcan!utzoo!henry henry@zoo.toronto.edu