Hacker News new | ask | show | jobs
by koorogi 3544 days ago
Casting pointers is well defined. What is undefined behavior is to dereference a pointer whose type does not match the pointed-to object.
1 comments

That's not correct in general; casting pointers is possibly undefined. However, it does seem a made a mistake trying to use void * as an example.