Bad array indexing is considered deadly

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 1 12:49:58 PDT 2017


On 01.06.2017 02:57, Moritz Maxeiner wrote:
>>
>> Termination of what? How on earth do you determine that the scope of 
>> this "undefined state" is the program, not the machine, or the world?
> 
> As that is the closest scope current operating systems give us to work 
> with, this is a sane default for the runtime. Nobody stops you from 
> using a different scope if you need it.
> 

Yes, they would stop me from using a smaller scope. 'nothrow' functions 
are not guaranteed to be unwindable and the compiler infers 'nothrow' 
automatically. Also, null pointer dereferences do not even throw. (On 
Linux.)


More information about the Digitalmars-d mailing list