Safety, undefined behavior, @safe, @trusted
Walter Bright
newshound1 at digitalmars.com
Thu Nov 5 13:16:58 PST 2009
Nick Sabalausky wrote:
> "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?
By disallowing casting an int to a pointer.
More information about the Digitalmars-d
mailing list