[Bug c++/87407] Enhance -Wunused-function to handle also inline functions

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Sep 24 11:10:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87407

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |NEW
   Last reconfirmed|                            |2018-09-24
         Resolution|INVALID                     |---
     Ever confirmed|0                           |1

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I think for C++ (which is the component this bug was created for, even if
comment 0 only has C examples) it makes sense to warn even for static inline
functions in headers ... why would you want to define them in headers?

In C++ they should probably just be inline, not static inline.

Even if we don't want the warning for headers, it does make sense for functions
defined in .C files.


More information about the Gcc-bugs mailing list