Viva64 Send comments on this topic.
Settings: Miscellaneous

Glossary Item Box

In the Miscellaneous page of the Viva64 settings you can define some special modes of the analyzer's work.

Settings: Miscellaneous

 

Find incorrect explicit type conversion.

In this mode the potentially dangerous explicit type conversions will also be diagnosed by the analyzer as errors. To turn on such a mode it is necessary to put a marker on "Find incorrect explicit type conversion", as it is shown at the picture. More detailed information about this mode can be found in Find incorrect explicit type conversion section.

 

The checked program allocates more than 2Gb of memory.

The errors which the analyzer can find may be divided into two groups:

A general error may be found by the analyzer no matter if the program works with more than 2GB of memory or not. For example, errors related to virtual functions ( V301) may be referred here.

Some errors are not typical of 64-bit programs processing a small data size. To simplify the process of diagnosing such programs by reducing the number of warning messages shown by the analyzer, the "The checked program allocates more than 2GB of memory" set has been introduced. Let’s study the purpose of this option on the example of the following code:

for (int index = 0; index != n; ++index)
  array[index] = 1; // V108

If the program does not work with large arrays this code will be correct in any program. The range of values which variable index can take will allow to index arrays consisting of INT_MAX items. And as far as our program does not process more than 2GB of data we can disable the "The checked program allocate more than 2GB of memory" not to have an unnecessary message V108 on line "array[index] = 1;".

Now let’s study the case when our array contains 5 billions items. In this case the use of variable of int type as an index is impossible and we should enable the for searching corresponding errors.

 

Show progress indicator while Viva64 is analysing your code.

If this mode is checked you can see progress bar in separate window while code is analysing. 

 

See also:

find incorrect explicit type conversion

implicit type conversion

explicit type conversion