stack frame & dangling pointer weirdness
drug
drug2004 at bk.ru
Thu Apr 21 12:57:49 UTC 2022
On 21.04.2022 14:25, Alain De Vos wrote:
>
> No error was thrown during execution.
> Should an error be thrown or is this optional by the operating system ?
> How can i force an error to be thrown when doing something "bad" ?
No error may be thrown here because it is not an error at all - compiler
thinks you do it intentionally because D is a system programming
language and your code is a @trusted one. To get compilation error you
should use @safe - but this may limit you in some way (not like in rust
but nevertheless). In runtime you can also use valgrind (linux only).
More information about the Digitalmars-d-learn
mailing list