[Bug c/54113] -Wmissing-prototypes produces false alarms for C99 inline functions
egallager at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Sep 7 02:55:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |egallager at gcc dot gnu.org
--- Comment #5 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Paul Eggert from comment #0)
>
> The simplest way to work around the problem is to avoid
> the use of -Wmissing-prototypes, but that disables the
> diagnostic for non-inline functions, where it's useful.
>
Note that this only works for plain C; using diagnostic pragmas (like those
expanded from gnulib's _GL_INLINE_HEADER_BEGIN) to suppress
-Wmissing-prototypes leads to the following warning in C++:
build-gnulib/../config.h:2101:5: warning: option ‘-Wmissing-prototypes’ is
valid for C/ObjC but not for C++ [-Wpragmas]
_Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
^~~~~~~
More information about the Gcc-bugs
mailing list