[Issue 14482] [SPEC] Goto's into catch blocks should be an error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 14 00:03:20 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=14482

Iain Buclaw <ibuclaw at gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #2 from Iain Buclaw <ibuclaw at gdcproject.org> ---
Nope still a bug in DMD.

```
void test8()
{
  int a;
  goto L2;    // BOOM!  Jump into a forbidden EH region

  try {
      a += 2;
  }
  catch (Exception) {
      a += 3;
L2: ;
      a += 100;
  }
  assert(a == 100);
}
```

--


More information about the Digitalmars-d-bugs mailing list