http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55830



             Bug #: 55830

           Summary: inline and __attribute__((always_inline)) treated

                    differently for unused-function warning

    Classification: Unclassified

           Product: gcc

           Version: 4.7.1

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: c

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: bro...@gcc.gnu.org





Consider the case of a header file containing definitions of static inline

functions, included in a number of source files (which may not use all of the

defined functions), compiled with C99 and -Wall -Wextra.



If the functions are defined as "static inline", GCC will mask the "unused

function" warning.



However, if the functions are defined as "static

__attribute__((always_inline))", then GCC will omit "unused function" warnings

whenever one of them is not used in a given source file.



This really should be consistent, and it would be ideal to maintain the

no-warning behavior and have that apply to both cases.

Reply via email to