[Bug c++/14827] Run time error, breaking of type info and static casts
giovannibajo at libero dot it
gcc-bugzilla@gcc.gnu.org
Sat Apr 3 17:21:00 GMT 2004
------- Additional Comments From giovannibajo at libero dot it 2004-04-03 17:20 -------
Yes. In legalese, the standard says that if you cast a pointer to an object to
a pointer to void, the only valid thing you can do with that is casting it back
to the same object type and use it. Otherwise, you hit undefined behaviour.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14827
More information about the Gcc-bugs
mailing list