Our website uses cookies to enhance your browsing experience.
Accept
to the top
>
>
>
V605. Unsigned value is compared to...
menu mobile close menu
Additional information
toggle menu Contents

V605. Unsigned value is compared to the NN number. Consider inspecting the expression.

Feb 27 2012

The analyzer has detected a potential error in an expression where an unsigned variable is compared to a negative number. This is a rather rare situation and such a comparison is not always an error. However, getting the V605 warning is a good reason to review the code.

This is an example of code the V605 warning will be generated for:

unsigned u = ...;
if (u < -1)
{ ... }

This diagnostic is classified as:

You can look at examples of errors detected by the V605 diagnostic.