UINT uLong = 0;
WORD byVal = 1;
WORD byVal1 = 3;
if (uLong != (byVal * byVal1))
{
printf("Correct");
}
else
{
printf("Incorrect");
}
Above code gives me "warning C4389: '!=' : signed/unsigned mismatch"
As all the variables involved in expression are unsigned how can it result in this warning. BTW this happens only on Microsoft compiler and not on GCC.
Is it a bug in Microsoft compiler, if not can anyone let me know how to fix this in my code?
I am using Microsoft Visual Studio Premium Version 12.0.21005.1 REL.
Thanks & Regards,Amit Kulkarni.