https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66869
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org, | |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The problem is caused by the move of check_global_declaration* into cgraph; the problem is that these decls that are never used are simply never added to the cgraph. Trying to emit this warning at the end of c_write_global_declarations_1 (if a decl satisfies those conditions and does not have a cgraph node, emit warning) might be ok, unless there is the possibility that a cgraph node would be created for it later on.