Article View: comp.std.c
Article #712Re: Declarations in switches, errors
From: Alan J Rosenthal
Date: Thu, 12 Oct 1989 23:17
Date: Thu, 12 Oct 1989 23:17
31 lines
1828 bytes
1828 bytes
davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) writes: >>>I submit that executing a switch statement constitutes "normal entry" kremer@cs.odu.edu (Lloyd Kremer) writes: >>No, a switch statement is entered by a jump to a label. diamond@csl.sony.co.jp (Norman Diamond) writes: >Mr. Kremer, you start your reply with "No." So you think that correct >execution of a switch statement constitutes abnormal entry to the block. >I conjecture that very few will agree with you. A point generally being missed in this discussion is that "normal entry" is a precise term. It is not just whatever method you personally usually choose to enter a block with a particular wrapper. It is the method of entering a block in general which is called "normal entry" by the standard. I can't find a definition of "normal entry", but I do find the following, 3.1.2.4, January 1988 draft: ... automatic storage duration. Storage is guaranteed to be reserved for a new instance of such an object on each normal entry into the block in which it is declared, or on a jump from outside the block to a label in the block or in an enclosed block. 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. I think this is extremely clear. ajr -- Vs encr vf n xvaq bs frk, gura n chapu va gur zbhgu vf n xvaq bs gnyxvat.
Technical Details
Message-ID:
<1989Oct12.191702.18757@jarvis.csri.toronto.edu>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!dgp.toronto.edu!flapsReferences:
<561@crdos1.crd.ge.COM> <10041@xanth.cs.odu.edu> <10888@riks.csl.sony.co.jp>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!dgp.toronto.edu!flaps From: flaps@dgp.toronto.edu (Alan J Rosenthal) Newsgroups: comp.std.c Subject: Re: Declarations in switches, errors Message-ID: <1989Oct12.191702.18757@jarvis.csri.toronto.edu> Date: 12 Oct 89 23:17:02 GMT References: <561@crdos1.crd.ge.COM> <10041@xanth.cs.odu.edu> <10888@riks.csl.sony.co.jp> Lines: 31