On 02.03.2018 15:39, Steven Schveighoffer wrote:

In this interpetation, -noboundscheck switches DMD to a different dialect of D. In that dialect, out-of-bounds accesses (and overlapping copies, apparently) always have UB, in both @system and @safe code. That defeats the purpose of @safe. Which is why I don't really care for that dialect.

I agree, I think we should remove the option to disable bounds checks on @safe code, in any way. It's too dangerous. If you want performance that comes without bounds checks, use a trusted escape, or write system code.

I.e., the -release flag should not remove assertions in @safe code, or at the very least it should not turn them into sources of UB.

Reply via email to