Team,
Any comment for the following behavior for warning?
Compiling the code below with cgtools 7.4.1 doesn't generate a warning, although an uninitialized variable is used in line 7.
When line 4 is uncommented, a warning is generated, as expected.
command line is: cl6x.exe -c tmp.c
void fn(void)
{ int foo, bar, i;
i = 10;
//foo = bar; /* generates warning 551-D */
do
{
foo = bar; /* doesn't generate a warning */
*(unsigned int *)i = foo;
} while (--i);
}
Is there a particular reason why the statement in line 7 doesn't generate a warning?
Thanks and best regards,
Anthony