Hi Tim,

> FreeBSD clang version 6.0.0 (tags/RELEASE_600/final 326565) (based on
> LLVM 6.0.0)

OK.

> 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/

> 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

> 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.

Bruno


Reply via email to