Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
koorogi
· 10y ago · 0 comments
Casting pointers is well defined. What is undefined behavior is to dereference a pointer whose type does not match the pointed-to object.
Comments
[–]
akvadrako
10y ago
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.