On 12/10/2013 3:04 PM, Timon Gehr wrote:
Malloc is part of the language runtime. Everything needed is known about it, in
particular that it is pure (in the D sense). Also, the source code of malloc
will not be standard C code.

All right, so write your own storage allocator. How are you going to tell the C compiler that it's pure?

In any case, please understand that giving even a valid example of a case where
such an approach cannot do well (e.g. all variables under consideration are
actually mutated) does not invalidate the statement made.

Pointers coming from things like allocators and data structures where no known compiler technoloty could deduce what is happening in it are the norm, not the exception.

Reply via email to