bug-gnulib
[Top][All Lists]
Advanced

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

Re: bug#34817: coreutils 8.31 compile failure on rhel5


From: Paul Eggert
Subject: Re: bug#34817: coreutils 8.31 compile failure on rhel5
Date: Wed, 13 Mar 2019 14:49:10 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

On 3/13/19 11:35 AM, Bruno Haible wrote:
> A simpler fix would have been to mark the 'minus_zero' variable as 'static':

Yes, that would have been a smaller change. Although I originally did
that, there's a reason I went for the larger change.

Making the variable 'static' might cause some compilers to notice that
the variable never changes, so it's a constant, so it can be folded, and
then they (mistakenly) convert -0.0 to 0.0. Originally the variable was
extern and the extern hack prevents most compilers from doing this
incorrect optimization (unless they're doing whole-program optimization,
which typically they aren't). Since making the variable static removed
the hack, I decided it was clearer to use the larger change, which makes
it more obvious that we aren't trying to work around this potential
problem any more.

I hope the issue I mentioned is not a real problem. If it is, we can go
back to the old code except rename the variable so that it's called
"lminus_zero" for the long double case. I considered doing that too, but
that's even more confusing and I hope we don't have to be that confusing.




reply via email to

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