I've been away of D since a while but I'm surprised to see DMD accepting this input without any **warning**s

```d
module runnable;

void main() nothrow  // no landing pad
{
    enum E {e0}
    E e;
    final switch (e)
    {
        case E.e0: goto case E.e0;
    }
    return; // statement not reachable
}

void other() nothrow // no landing pad
{
    enum E {e0}
    E e;
    final switch (e)
    {
        case E.e0: goto case E.e0;
    }
    int a; // declaration not reachable
}

int shoudlebeLike()
{
    assert(0)  ;
    while (true)
    {
        other();
    }
    assert(0);
    other();
    return 0;
}
```

(tried with -w -wi, etc).
  • what happened to... Basile B. via Digitalmars-d-learn
    • Re: what ha... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
      • Re: wha... Basile B. via Digitalmars-d-learn
        • Re:... Kapendev via Digitalmars-d-learn
          • ... Basile B. via Digitalmars-d-learn
            • ... monkyyy via Digitalmars-d-learn
            • ... Kapendev via Digitalmars-d-learn
              • ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
        • Re:... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn

Reply via email to