Viva64 Send comments on this topic.
V203. Explicit type conversion from memsize to double type or vice versa

Glossary Item Box

The analyzer found a possible error related to the explicit conversion of memsize type into double type and vice versa. The possible error may consist in the impossibility to save the whole range of values of memsize type in variables of double type.

This warning may be shown if you use the Search for explicit type conversions mode. This error is completely similar to error V113 "Implicit type conversion from memsize to double type or vice versa". The difference is in that the explicit type conversion is used as in a further example:

  Copy image Copy Code
SIZE_T size = SIZE_MAX;
double tmp = static_cast<double>(size);
size = static_cast<SIZE_T>(tmp); // x86: size == SIZE_T
                                 // x64: size != SIZE_T

To study this kind of errors see the description of error V113.

See also:

memsize type

limitations of Viva64 analyzer

V113. Implicit type conversion from memsize to double type or vice versa

implicit type conversion

explicit type conversion

search of explicit type conversions