Am Thu, 17 Jan 2013 13:15:06 +0100
schrieb "Maxim Fomin" <[email protected]>:

> On linux, segfaults can be translated into exceptions using this 
> module 
> (https://github.com/D-Programming-Language/druntime/blob/master/src/etc/linux/memoryerror.d)
>  
> however I do not know how to use it - I get linker errors.
> 
> On windows null pointer errors are translated into Object.Error 
> (Access Violation) - I do not remember exactly.
> 
> In any case, your void callScope(ref int x) can be blown up by:
> int* ptr; callScope(*ptr); so, exceptions may come when they are 
> not expected.

Uh, does that meany that a D compiler can never optimize by removing
exception handling, even if it can prove that all involved methods are
nothrow and don't throw errors as well?

Reply via email to