[Issue 602] Compiler allows a goto statement to skip an initalization

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 19 15:32:24 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=602



--- Comment #15 from bearophile_hugs at eml.cc 2013-11-19 15:32:19 PST ---
(In reply to comment #14)

> I think it
> goes without saying that the onus is on any D compiler writer who chooses to
> add such a feature as computed goto to figure out how to get all this working.

You must leave the door open for future compiler writers that want to add
computed gotos to D. They are an useful optimization if you want to implement
threaded interpreters, certain finite state machines, etc. System languages as
C/C++/D are the language you usually want to use if you want to write an
interpreter that is both simple and fast.

Designing D (or its front-end implementation) to make it more difficult for
future D compiler writers to implement compiled gotos (that are currently
supported by the back-end of both GCC and Clang, so someone could add them to
LDC2 or GDC without too much work) is silly.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list