ICU-10439 add comment about why volatile is here

X-SVN-Rev: 34476
This commit is contained in:
Steven R. Loomis 2013-09-25 02:08:52 +00:00
parent d437a719e3
commit 99fc90c94d

View File

@ -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