[Issue 6683] Skipping declaration with goto resulted in nonsense
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Sep 16 17:23:41 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6683
Simen Kjaeraas <simen.kjaras at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |simen.kjaras at gmail.com
--- Comment #1 from Simen Kjaeraas <simen.kjaras at gmail.com> 2011-09-16 17:23:19 PDT ---
The spec says "It is illegal for a GotoStatement to be used to skip
initializations.". (
http://www.d-programming-language.org/statement.html#GotoStatement )
According to the glossary
(http://www.d-programming-language.org/glossary.html), "A code construct is
illegal if it does not conform to the D language specification. This may be
true even if the compiler or runtime fails to detect the error."
So the compiler is free to ignore illegal code. A future compiler, potentially
not dmd, may indeed flag it as a compile-time error, so any behavior caused by
illegal code should be regarded as unpredictable and unreliable.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list