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). -- Summary: Missing warning about uninitialized variable Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ext at sidvind dot com GCC build triplet: x86_64-pc-linux-gnu GCC host triplet: x86_64-pc-linux-gnu GCC target triplet: x86_64-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42238