Bug 859257 - Mark DoublePun values in ToIntWidth as volatile to work around a Clang bug. r=jwalden

--HG--
extra : rebase_source : 9bcedd8d1c4194ef628f9473c444c465c2049443
This commit is contained in:
Jan de Mooij 2013-04-12 14:16:57 +02:00
parent 58689254aa
commit 6b0d9bb8d0

View File

@ -40,7 +40,13 @@ ToIntWidth(double d)
{
#if defined(__i386__) || defined(__i386) || defined(__x86_64__) || \
defined(_M_IX86) || defined(_M_X64)
#ifdef __clang__
/* volatile to keep Clang from miscompiling, see bug 859257. */
volatile detail::DoublePun du, duh, twoWidth;
#else
detail::DoublePun du, duh, twoWidth;
#endif
uint32_t di_h, u_tmp, expon, shift_amount;
int32_t mask32;