ICU-5025 Better fix for an Intel compiler optimization bug.

X-SVN-Rev: 19513
This commit is contained in:
George Rhoten 2006-04-04 15:56:38 +00:00
parent a28d9218a0
commit ebbb957f9d

View File

@ -361,7 +361,7 @@ static void U_CALLCONV DataDrivenScanf(void)
int32_t i32, expected32; int32_t i32, expected32;
int64_t i64, expected64; int64_t i64, expected64;
double dbl, expectedDbl; double dbl, expectedDbl;
float flt, expectedFlt; float flt, expectedFlt; // Use volatile in order to get around an Intel compiler issue.
int32_t uBufferLenReturned; int32_t uBufferLenReturned;
//const char *fileLocale = "en_US_POSIX"; //const char *fileLocale = "en_US_POSIX";
@ -413,7 +413,6 @@ static void U_CALLCONV DataDrivenScanf(void)
break; break;
case 0x66: // 'f' float case 0x66: // 'f' float
expectedFlt = (float)atof(u_austrcpy(cBuffer, expectedResult)); expectedFlt = (float)atof(u_austrcpy(cBuffer, expectedResult));
flt = 0.0f; // Initialize to 0 in order to get around an Intel compiler issue.
uBufferLenReturned = u_sscanf_u(argument, format, &flt); uBufferLenReturned = u_sscanf_u(argument, format, &flt);
//uFileBufferLenReturned = u_fscanf_u(testFile, format, flt); //uFileBufferLenReturned = u_fscanf_u(testFile, format, flt);
if (flt != expectedFlt) { if (flt != expectedFlt) {