Can someone provide an example were casting a pointer from one type to another fails due to mis-alignment?
In the comments to this answer, bothie states that doing s
char *foo = "...."; foo++; int *bar = (int *)foo;
The compiler would put foo on a word boundary, and then when you increment it it's at a word+1, which is invalid for a int pointer.