GCC Bugzilla – Bug 10539
g++ does not issue a warning on "int a = a + 1" statements.
Last modified: 2003-06-12 00:03:50 UTC
The following code compiles without any warning:
int a = a + 1;
The variable "a" does not exist in the global name space, which means that the uninitialized local variable "a" is accessed. A warning like "access to uninitialized variable" would be appropriate.
*** This bug has been marked as a duplicate of 10538 ***