All C compilers I\'ve tried won\'t detect uninitialized variables in the code snippet below. Yet the case is obvious here.
Don\'t bother about the functionality of t
Yes, it should raise a warning about that uninitialized variable, but it's a GCC bug. The example given there is:
unsigned bmp_iter_set ();
int something (void);
void bitmap_print_value_set (void)
{
unsigned first;
for (; bmp_iter_set (); )
{
if (!first)
something ();
first = 0;
}
}
And diagnosed with -O2 -W -Wall.
Unfortunately, this year is the 10 year anniversary of this bug!