stack frame & dangling pointer weirdness

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Apr 21 14:13:25 UTC 2022


On Thu, Apr 21, 2022 at 11:25:29AM +0000, Alain De Vos via Digitalmars-d-learn wrote:
> On Thursday, 21 April 2022 at 06:57:41 UTC, drug wrote:
> > On 21.04.2022 08:49, Alain De Vos wrote:
> > > Following program:
> > > ```
> > > import std.stdio;
> > > 
> > > void main() @trusted
> > > {
[...]
> > > }
> > > ```
[...]
> How can i force an error to be thrown when doing something "bad" ?

Use @safe instead of @trusted.


T

-- 
No! I'm not in denial!


More information about the Digitalmars-d-learn mailing list