[Bug c/45468] gcc does not warn about missing `-O' flag when specifying `-Wuninitialized'

jellegeerts at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Aug 31 20:36:00 GMT 2010



------- Comment #5 from jellegeerts at gmail dot com  2010-08-31 20:36 -------
With `gcc -std=c99 -Wuninitialized -O0' I get no warning for the following code
snippet (I do with `-O1' though), so it still seems GCC 4.5.1 should warn about
`-O' not being specified.

<<<<<<<<<<<<<<<
#include <stdio.h>

int main(void)
{
    for (int i; i < 32; ++i)
    {
        printf("%d\n", i);
    }

    return 0;
}
>>>>>>>>>>>>>>>


-- 

jellegeerts at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


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



More information about the Gcc-bugs mailing list