[Bug c/42884] GCC (v4.3.3) fails to detect uninitialized variable

tadhunt at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Sep 2 16:01:00 GMT 2010



------- Comment #19 from tadhunt at gmail dot com  2010-09-02 16:01 -------
This flamewar in the comments is hilarious.

To all concerned, here is a much simpler example.  This does appear to be a
regression.  I apologize that I cannot help fix it, as it's a really useful
feature that helps catch bugs.  Hat's off to you folks working hard on gcc.

int
main(void)
{
        int len, i;

        for(i = 0; i < 5; i++) {
                printf("%d\n", len);            // no warning!
                len = 10;
        }

        return 0;
}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42884



More information about the Gcc-bugs mailing list