Safety, undefined behavior, @safe, @trusted

dsimcha dsimcha at yahoo.com
Thu Nov 5 12:47:15 PST 2009


== Quote from Nick Sabalausky (a at a.a)'s article
> "Walter Bright" <newshound1 at digitalmars.com> wrote in message
> news:hcvbu7$9i$1 at digitalmars.com...
> >
> > For example, assigning a random value to a pointer and then trying to read
> > it is undefined behavior.
> How would the compiler be able to detect that? Or do you mean assigning an
> arbitrary value?

How do you generate a random pointer without casting it from an int (not allowed
in SafeD) or doing pointer arithmetic (not allowed in SafeD)?



More information about the Digitalmars-d mailing list