http://d.puremagic.com/issues/show_bug.cgi?id=6683


Stewart Gordon <s...@iname.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid
                 CC|                            |s...@iname.com


--- Comment #5 from Stewart Gordon <s...@iname.com> 2011-10-26 14:11:20 PDT ---
(In reply to comment #1)
> 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."

For all I know, that probably means "This may be true even if some compiler,
because of a bug in it, fails to detect the error."

> So the compiler is free to ignore illegal code.

Which is the bit of illegal code - the goto statement or the declaration it
skips?  In my experience, the compiler doesn't ignore either.

Moreover, why does the spec bother to forbid anything if compiler writers are
free to ignore it all?

> 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.

So you're claiming all accepts-invalid bugs are really enhancement requests?

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

Reply via email to