https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90852
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- Yes, Bug 49171 comment 13 is clear that the reinterpret_cast is not valid, and Bug 49171 comment 14 intentionally changes the compiler to reject it. This is not a recurring bug, it's not a bug at all, this is the correct behaviour. Just copying chunks of code from other bug reports like this is not helpful.