Sep 3, 2017

[c++][memo] cast char* to T* violates memory alias.


Casting a pointer to some type T to a pointer to a char type does not violate strict aliasing.
Casting a pointer to a char type to a pointer to an unrelated type does break strict aliasing.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.