Is this a bug? +goto
Stanislav Blinov
stanislav.blinov at gmail.com
Wed Nov 7 20:37:02 UTC 2018
On Wednesday, 7 November 2018 at 20:03:47 UTC, Michelle Long
wrote:
> Case A:
>
> int x;
> {
> if (true) goto X;
> //int x;
> }
> ~x;
> X:
That is not "Case A". This one is:
{
if (true) goto X;
T x;
X:
} // x.__dtor
That should error as an easy cop-out, nothing wrong with that
approach. However, this:
{
if (true) goto X;
T x;
} // x.__dtor
X:
should not error at all, since goto skips both initialization and
use. No one is disputing that. From your posts if I understand
correctly it's that second case that errors in your code. If it
does, there's a bug, but it's on you to provide a test case.
Simple as that. Yet you're all wound up as if the world is out to
get you.
More information about the Digitalmars-d-learn
mailing list