From: Ole-Hjalmar Kristensen <ole-hjalmar.kristensen@substitute_employer_here.com>
Subject: Re: Why no named case statements?
Date: 07 Sep 2009 09:27:35 +0200
Date: 2009-09-07T09:27:35+02:00 [thread overview]
Message-ID: <wvbreiqjb4ew.fsf@sun.com> (raw)
In-Reply-To: 26253452-b337-413c-9f7f-9e0a9b4f66fa@t2g2000yqn.googlegroups.com
That could be useful, but I have seen compilers produce worse code by
having labels around (like not putting variables in registers),
presumably because the analysis showed it was a potential target for a
goto.
>>>>> "B" == Britt <britt.snodgrass@gmail.com> writes:
<snip>
B> Labels are also useful as breakpoint targets if the compiler produces
B> associated symbolic information that can then be used by the
B> debugger. Using labels for this purpose is much better (more
B> maintainable) than breaking on line numbers. Such permanent
B> breakpoints are sometimes useful in formal white-box test procedures.
B> SPARK was recently changed to allow use of Ada labels for this
B> purpose (breakpoints, not gotos), and the GNATPP pretty-printer now
B> has a new switch to format Ada labels on separate lines (as shown in
B> Dmitry's example).
<snip>
B> - Britt
--
C++: The power, elegance and simplicity of a hand grenade.
prev parent reply other threads:[~2009-09-07 7:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-04 23:06 Why no named case statements? Britt Snodgrass
2009-09-04 23:47 ` Adam Beneschan
2009-09-05 0:29 ` Robert A Duff
2009-09-05 0:49 ` Adam Beneschan
2009-09-05 1:04 ` Robert A Duff
2009-09-05 8:18 ` Dmitry A. Kazakov
2009-09-06 12:44 ` Robert A Duff
2009-09-06 17:46 ` Britt
2009-09-07 7:27 ` Ole-Hjalmar Kristensen [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox