From: Steven R. Loomis Date: Wed, 25 Sep 2013 00:31:46 +0000 (+0000) Subject: ICU-10439 add volatile as per StackOverflow:2219829 to work around what seems to... X-Git-Tag: milestone-59-0-1~2438 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=006d7063b7c7c1561961af6f7d4a92c542644f3d;p=icu ICU-10439 add volatile as per StackOverflow:2219829 to work around what seems to be an optimizer bug in GCC -m32 (at least GCC 4.4.7 and 4.8.1) - revisit in ICU-10420 and ilk. X-SVN-Rev: 34471 --- diff --git a/icu4c/source/i18n/decimfmt.cpp b/icu4c/source/i18n/decimfmt.cpp index 10229d0301d..4a0da8ed8bf 100644 --- a/icu4c/source/i18n/decimfmt.cpp +++ b/icu4c/source/i18n/decimfmt.cpp @@ -1078,7 +1078,7 @@ DecimalFormat::getFixedDecimal(const Formattable &number, UErrorCode &status) co } if (type == Formattable::kInt64) { - double fdv = number.getDouble(status); + volatile double fdv = number.getDouble(status); // Note: conversion of int64_t -> double rounds with some compilers to // values beyond what can be represented as a 64 bit int. Subsequent // testing or conversion with int64_t produces bad results.