Declarations in switches, errors

Shankar Unni shankar at hpclscu.HP.COM
Fri Sep 29 06:32:10 AEST 1989


> Note the initialization in the 4th statement. I was unable to find any
> compiler which generated working code for this initialization (although
> one did complain that the code was not reached). I tried Sun, Ultrix,
> Xenix and gcc compilers.

Did you consider the remote possibility that the compilers were right and
you were wrong in your proposition?

Read the Dec 88 draft of the proposed ANSI C standard (pages 78,79) for a
good explanation of this. The operative word that it uses is "jump". Not a
normal flow of control, by any stretch of imagination.
-----
Shankar Unni                                   E-Mail: 
Hewlett-Packard California Language Lab.     Internet: shankar at hpda.hp.com
Phone : (408) 447-5797                           UUCP: ...!hplabs!hpda!shankar



More information about the Comp.lang.c mailing list