No modification of pointer values in safe functions?

Mark smarksc at gmail.com
Thu Jan 4 08:37:16 UTC 2018


On Wednesday, 3 January 2018 at 23:49:33 UTC, H. S. Teoh wrote:
> On Wed, Jan 03, 2018 at 03:42:07PM -0700, Jonathan M Davis via 
> Digitalmars-d-learn wrote:
>> On Wednesday, January 03, 2018 22:25:16 Mark via 
>> Digitalmars-d-learn wrote:
> [...]
>> > https://dlang.org/spec/function.html#safe-functions
>> >
>> > "The following operations are not allowed in safe functions:
>> >
>> > [...]
>> > - No modification of pointer values.
>> > [...]"
>> 
>> Then the spec needs to be clarified. Assignment is fine but 
>> other types of mutation are not.
>
> Here's my attempt to clarify it:
>
> 	https://github.com/dlang/dlang.org/pull/2050
>
>
> T

Okay, that's clear now.

Ali's book wasn't clear on that either ("Pointers cannot be 
mutated"). I'll ask him to clarify it.


More information about the Digitalmars-d-learn mailing list