[Issue 24772] Casting class references to void* should be @safe

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 19 16:57:49 UTC 2024


https://issues.dlang.org/show_bug.cgi?id=24772

--- Comment #4 from Georgy Markov <ogion.art at gmail.com> ---
(In reply to Richard (Rikki) Andrew Cattermole from comment #3)
> 
> You have lost the type system guarantees, calling into unknown code.
> 
> Which yes, if you passed the wrong arguments could have led to program
> corruption.

Irrelevant. The cause of possible memory corruption is function call, not
pointer conversion.

--


More information about the Digitalmars-d-bugs mailing list