https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105885
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- We diagnose only after template substitution where we cannot distinguish literal if (nullptr == nullptr) from if (ARG == nullptr) I think. I guess reporters reasoning is that ARG is defaulted to nullptr and that's the reason the diagnostic is unwanted?