[Bug c++/85043] -Wuseless-cast false positive for temporary objects; add separate -Wcast-to-the-same-type to cover that case instead

egallager at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Oct 24 04:36:58 GMT 2022


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.


More information about the Gcc-bugs mailing list