https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95057
--- Comment #2 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> --- (In reply to Jakub Jelinek from comment #1) > That is something this warning can't warn about. > The warning is a simple FE warning that uses two bits, one for whether > certain decl was used and one whether it was read. The warning then > diagnoses those that have the former bit set and not the latter (of course, > there are some exceptions etc.). But when the variable is assigned, the "read" bit could be reset.