This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug debug/66869] [6 regression] -Wunused-function no longer warns for static declarations without definition


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]