Hi Bruno, On 28.08.19 17:28, Bruno Haible wrote: >> The option -Wused-but-marked-unused is indirectly activated by >> -Weverything > > -Weverything is not something we can support in gnulib. For the > meaning of this option, see > https://quuxplusone.github.io/blog/2018/12/06/dont-use-weverything/
I can't agree 100% with the statements in this article. We use -Weverything + some -Wno- options successfully for our sources since years. Though, building the gnulib sources has a different set of options of course. >> which is set during the ./configure run (kind of a >> manywarnings module) > > Why do we have a 'manywarnings' module, not an 'allwarnings' module? > Look into the list of warnings that we don't add through 'manywarnings': > build-aux/gcc-warning.spec > build-aux/g++-warning.spec Thanks for the pointers. >> And I wonder why do the c_ macros are marked >> UNUSED at all (I assume that gnulib does it for some reason) ? > > 'c-ctype' uses the module 'extern-inline'. In extern-inline.m4 you can > see that on platforms where 'extern inline' cannot properly be supported, > we let _GL_INLINE expand to 'static _GL_UNUSED'. Without '_GL_UNUSED', > gcc (with some appropriate, useful warning options) would complain that > the functions are not used. > > The ability to use this warning option - which allows developers to > detect dead code - is more important than the option -Wused-but-marked-unused. That's reasonable. I'll put that option on the exclude list for the gnulib sources. Thanks for the explanation, I didn't see that in the first place (the FreeBSD is a CI image, not controlled by me). Regards, Tim
signature.asc
Description: OpenPGP digital signature