This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Don't use -Wno-uninitialized in math/

On Thu, Aug 20, 2015 at 3:47 PM, Joseph Myers <> wrote:
> On Thu, 20 Aug 2015, Stan Shebs wrote:
>> On Thu, Aug 20, 2015 at 1:00 PM, Joseph Myers <> wrote:
>> > The uninitialized variable warnings in math/ having been fixed for all
>> > the supported floating-point formats, this patch removes the use of
>> > -Wno-uninitialized there, continuing with the goal of avoiding -Wno-
>> > options in makefiles as far as possible..
>> Not sure how you didn't see this, but my fresh build fails with this
>> (GCC 4.8.4, Ubuntu 14.04, vanilla configure):
> I'm testing with GCC 5.  Maybe newer GCC detects that sign is set under
> one "absx >= 0.6743316650390625L" conditional and used under the next such
> conditional, so is never actually used uninitialized, but older GCC
> doesn't detect that the conditionals are the same?
> Anyway, since you're testing with the compiler with which this fails, I
> advise submitting a patch that uses the DIAG_* macros from libc-internal.h
> to suppress the warning around the specific code that gets the warning,
> with a comment explaining why it's a false positive and with 4.8 named as
> the version in the call to DIAG_IGNORE_NEEDS_COMMENT.  (Remember that when
> disabling -Wmaybe-uninitialized, you need to disable -Wuninitialized
> instead if !__GNUC_PREREQ (4, 7), as 4.6 doesn't have
> -Wmaybe-uninitialized.)

Yes, that works, thanks!  I notice that there are several pre-existing
instances of this pattern, but some list 4.9 and others list 5 as the
version - does anybody know if there is a canonical minimal GCC
version for the better uninitialized warning, or is it just whatever
was getting tested at the time?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]