https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85043
--- Comment #17 from Eric Gallager <egallager at gcc dot gnu.org> --- (In reply to Marek Polacek from comment #16) > Should be fixed now. It seems the fix just silenced the -Wuseless-cast false positive without also adding the separate -Wcast-to-the-same-type flag to cover that case instead; I still think that would be useful.