void* pointers get corrupted: D bug or misunderstanding?

Dennis dkorpel at gmail.com
Mon Jul 29 15:52:06 UTC 2019

On Monday, 29 July 2019 at 15:26:34 UTC, Federico Santamorena 
> I still actually want to push the idea that a void* pointer to 
> a void* pointer should be a warning emitted by the compiler.
> Or even better a new flag emitting warnings for fishy void* 
> pointers manipulation.
> Ideas about this?

Quick thoughts:
- there are legimate usecases for void**
- warnings are generally bad. They are either treated as pedantic 
non-standard errors, or they pile up until no-one looks at them 
- it's going to be annoying in generic code, templates need 
special checks that &T is not done if T may be a void*.
- compilers already have like 100 flags

More information about the Digitalmars-d mailing list