]> granicus.if.org Git - icu/commitdiff
ICU-10439 add comment about why volatile is here
authorSteven R. Loomis <srl@icu-project.org>
Wed, 25 Sep 2013 02:08:52 +0000 (02:08 +0000)
committerSteven R. Loomis <srl@icu-project.org>
Wed, 25 Sep 2013 02:08:52 +0000 (02:08 +0000)
X-SVN-Rev: 34476

icu4c/source/i18n/decimfmt.cpp

index 4a0da8ed8bf25b92f05e9344ba393d033dadcab6..c9d8b0c43a685c4d5c774415402acda55270d33b 100644 (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