Bruno Haible via Gnulib discussion list <[email protected]> writes:

> Collin Funk wrote:
>> +1 on adding it to manywarnings.
>> ...
>> Another example is
>> -Wno-tautological-constant-out-of-range-compare which just warns you for
>> writing portable code.
>
> There are more than that. Which of the following warnings (that I found
> annoying when using clang with GNU gettext) should we disable via
> manywarnings.m4 by default?
>
> -Wunused-function

I find this useful to find dead code.

> -Winconsistent-dllimport

Is that clang only?  It seems enabled by default in clang.

> -Wreserved-id-macro

I recall fixing my code to respect this long time ago, so it seem
useful.

> -Wundef

I'm ignoring this warning in some projects, but for others it is useful
in non-gnulib code.

> -Wmissing-field-initializers

That has been a long source for pain for me, especially for test code.
In some projects I ignore it because fixing it results in ugly code.

Is there any compilers that doesn't handle missing initializers
nowadays?  Maybe the time has come to just ignore this globally, and
permit that usage.

I suppose it is undefined if the field is initialized to NULL or not?

> -Wunused-parameter

I find this one useful.

> -Wgnu-include-next
> -Wimplicit-int-conversion
> -Wcomma
> -Wnonportable-system-include-path
> -Wtautological-unsigned-zero-compare
> -Wused-but-marked-unused
> -Wparentheses-equality
> -Wstring-plus-int

I've not felt a need to ignore those, and the design philosophy of
manywarnings is to enable ALL possible warnings and then allow
maintainer to back out of things that they disagree with.

We could provide some pre-defined set of warnings to ignore, for
maintainers who wish to opt-in and ignore entire sets of warnings,
perhaps?

> -Wsign-compare
> -Wsign-conversion
> -Wunused-macros
> -Wformat-nonliteral

These can be nosiy, but also useful and I fix code for these.

> -Wdeprecated-declarations

This seems useful to me.

/Simon

Attachment: signature.asc
Description: PGP signature

Reply via email to