bug-gnulib
[Top][All Lists]
Advanced

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

Re: silence some gcc -Wmaybe-uninitialized warnings


From: Paul Eggert
Subject: Re: silence some gcc -Wmaybe-uninitialized warnings
Date: Thu, 18 May 2023 15:37:18 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0

On 5/18/23 15:09, Bruno Haible wrote:

Some time ago, a distro guy explained on this list that IF_LINT does not
help in their situation, because the distro wants to build each package
once, with the settings that produce the best code, _and_ have the compiler
report warnings for this situation.

Yes, that's the typical situation.

How about the following patches? They replace two uses of IF_LINT with
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized".
The loss for reliability is small: it silences the "maybe uninitialized"
findings for an entire function, instead of just for one variable.
The upside is that it removes the warning on glibc systems and thereby
helps the human developer (me) focusing on real warnings produced by gcc.

Yes, that's OK. As you say, the loss for reliability is small that way.



reply via email to

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