Article View: comp.std.c
Article #654Re: Declarations in switches, errors
From: Tom Karzes
Date: Tue, 03 Oct 1989 06:24
Date: Tue, 03 Oct 1989 06:24
10 lines
1054 bytes
1054 bytes
In article <561@crdos1.crd.ge.COM> davidsen@crdos1.UUCP (bill davidsen) writes: -This is an error in the compilers! As ugly as this is, the ANSI standard -(3.1.2.4) says "If an initialization is specified for the value stored -in the object, it is performed on each normal entry, but not if the -block is entered by a jump to a label." Switching into a block via a switch statement clearly consitutes entering the block by a jump to a label. No code between the beginning of the block and the case label should be executed, including dynamic initializations of any automatic variables declared in the block.
Technical Details
Message-ID:
<1055@m3.mfci.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!yale!mfci!karzesReferences:
<561@crdos1.crd.ge.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!yale!mfci!karzes From: karzes@mfci.UUCP (Tom Karzes) Newsgroups: comp.std.c Subject: Re: Declarations in switches, errors Message-ID: <1055@m3.mfci.UUCP> Date: 3 Oct 89 06:24:29 GMT References: <561@crdos1.crd.ge.COM> Sender: karzes@mfci.UUCP Reply-To: karzes@mfci.UUCP (Tom Karzes) Organization: Multiflow Computer Inc., Branford Ct. 06405 Lines: 10