Declarations in switches, errors
    Henry Spencer 
    henry at utzoo.uucp
       
    Sun Oct  1 09:04:08 AEST 1989
    
    
  
In article <30540 at news.Think.COM> barmar at 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 at zoo.toronto.edu
    
    
More information about the Comp.std.c
mailing list