When compiling the following code I expect a warning about usage of uninitialized variable. int main(int argc, const char*[]){ do { int a = a; } while(1); return 0; } Even when compiled with "-Wall -Winit-self" I get no warning. I have tried with both g++-4.4.2 and g++-4.2.4 with the same result. This is a simplification of the case I posted on the gcc-help list (http://gcc.gnu.org/ml/gcc-help/2009-11/msg00250.html).
<bb 2>: # a_1 = PHI <a_2(D)(0), a_3(2)> a_3 = a_1; goto <bb 2>;
-Winit-self is broken in C++ *** This bug has been marked as a duplicate of 34772 ***