From 006d7063b7c7c1561961af6f7d4a92c542644f3d Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Wed, 25 Sep 2013 00:31:46 +0000 Subject: [PATCH] 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 --- icu4c/source/i18n/decimfmt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.