[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FreeBSD: Warnings about c-ctype macros used but marked unused

From: Tim Rühsen
Subject: Re: FreeBSD: Warnings about c-ctype macros used but marked unused
Date: Wed, 28 Aug 2019 20:08:52 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

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

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]