From 99fc90c94def174f62f90cbe76c11b8638e2e511 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Wed, 25 Sep 2013 02:08:52 +0000 Subject: [PATCH] ICU-10439 add comment about why volatile is here X-SVN-Rev: 34476 --- icu4c/source/i18n/decimfmt.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/icu4c/source/i18n/decimfmt.cpp b/icu4c/source/i18n/decimfmt.cpp index 4a0da8ed8bf..c9d8b0c43a6 100644 --- a/icu4c/source/i18n/decimfmt.cpp +++ b/icu4c/source/i18n/decimfmt.cpp @@ -1078,6 +1078,7 @@ DecimalFormat::getFixedDecimal(const Formattable &number, UErrorCode &status) co } if (type == Formattable::kInt64) { + // "volatile" here is a workaround to avoid optimization issues. 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