https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117046
--- Comment #6 from Carlos Galvez <carlosgalvezp at gmail dot com> --- Ah, that might explain it. It would be great to document the additional logic to avoid confusion. It may also help the LLVM folks implementing the same warning with consistent behavior to GCC: https://github.com/llvm/llvm-project/pull/111434