Undefined behaviours in D and C

BCS none at anon.com
Sat Apr 17 07:57:23 PDT 2010


Hello Walter,

> bearophile wrote:
> 
> I'm confused. It appears you want to write unsafe code and yet have it
> be guaranteed safe.

Currently the described code is legal, unsafe (it can result in invalid pointers) 
and has undefined semantics (it can result in unpredictable, implementation 
defined results). What I think bearophile wants is for only the last to be 
changed, that is; you can still do things that result in invalid pointers, 
but it does so in a well defined way (at least with regards to the bit pattern 
the pointer ends up as)



-- 
... <IXOYE><






More information about the Digitalmars-d mailing list