On Mon, Jul 15, 2013 at 08:59:44PM -0400, Jonathan M Davis wrote: > On Monday, July 15, 2013 14:48:08 Manfred Nowak wrote: > > Jonathan M Davis wrote: > > > gotos in such a context seem like a bit > > > of a nightmare to me though. > > > > I did realize this nightmare. Therefore the assurance in the docs > > is probably true only in the absence within the scope of at least > > gotos to targets within the scope. > > Well, I'd have to study exactly how goto works to say how exactly it > would interact with stuff like try-catch. I've pretty much only used > goto with case statements and loops and haven't spent the time trying > to sort out all of its idiosyncracies. I guess that I should add that > to be my todo list. [...]
My understanding is that goto translates directly to a jump in assembly, so jumping in/out of blocks with declarations or stuff that needs cleanups should immediately raise red flags. Of course, the compiler may do something intelligent by inserting implicit stack pointer adjustments and/or cleanup blocks, but I wouldn't count on it unless the language spec explicitly requires so. T -- I am Ohm of Borg. Resistance is voltage over current.
