betterC and noboundscheck

Basile B. b2.temp at gmx.com
Fri Nov 24 05:01:17 UTC 2017


On Friday, 24 November 2017 at 00:17:31 UTC, codephantom wrote:
> On Wednesday, 22 November 2017 at 15:10:40 UTC, Oleg B wrote:
>> If I add -noboundscheck flag all works fine.
>>
>> dmd version is 2.076.1
>>
>> Why -betterC flag not 'include' -noboundscheck flag?
>> It's bug or in some cases it's useful?
>
>
> Interestingly, ldc2 will compile this ok, without the 
> -noboundscheck flag
>
> btw. you should start using: boundscheck=off/on/safeonly flag 
> instead i believe.
>
> https://dlang.org/dmd-windows.html#switch-boundscheck

It's b/c LDC2 doesn't have the most recent betterC features. It 
works just like it worked in older DMD release (e.g w 2.075), 
when betterC was "inexact" / "mostly unimplemented"


More information about the Digitalmars-d-learn mailing list