[Issue 14931] switch doesn't work with any pointers
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Aug 18 18:05:12 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14931
--- Comment #6 from yebblies <yebblies at gmail.com> ---
(In reply to Andrei Alexandrescu from comment #5)
> (In reply to yebblies from comment #4)
> > (In reply to Andrei Alexandrescu from comment #3)
> > > Yah, accept it and subject it to the usual assumptions and optimizations
> > > that go for equivalent integral-based switch statements.
> >
> > There is no guarantee that integral switches get turned into jump tables.
>
> Understood, thanks. Just handle them the same is all.
We should be able to support pointer switch, but we can't do pointer switch
jump tables since the pointer's integer representation isn't known until link
time.
--
More information about the Digitalmars-d-bugs
mailing list