This is a minor (but annoying warning spewage) gnulib addition to config.h when compiling with G++
In file included from <command-line>:0:0: ./../../config.h:10238:5: warning: option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++ [-Wpragmas] _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ ^ The code around line 10238 in config.h looks like this: #if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) # if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ # define _GL_INLINE_HEADER_CONST_PRAGMA # else # define _GL_INLINE_HEADER_CONST_PRAGMA \ _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") # endif /* Suppress GCC's bogus "no previous prototype for 'FOO'" and "no previous declaration for 'FOO'" diagnostics, when FOO is an inline function in the header; see <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>. */ # define _GL_INLINE_HEADER_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ _GL_INLINE_HEADER_CONST_PRAGMA # define _GL_INLINE_HEADER_END \ _Pragma ("GCC diagnostic pop") #else # define _GL_INLINE_HEADER_BEGIN # define _GL_INLINE_HEADER_END #endif Conditioning the define with “#ifndef __cplusplus” makes the warning go away: _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ $ g++ --version g++ (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1) hth 73 de Jeff