GCC Bugzilla – Bug 14739
Silently allows initializing a variable to itself (int i = i + 1)
Last modified: 2005-07-23 22:49:57 UTC
If I wrote int i = i + 1, I'd expect to get an error or at least a warning, but
GCC doesn't give a peep even with -Wall. Instead it proceeds to increment an
uninitialized register and store it to i. Maybe there's some reason for this,
but I don't see it.
Tested with GCC 3.3.3-3 on Fedora Core development and 2.96-113 on Red Hat 7.3.
Yes because it is a dup of bug 10538 which is fixed in 3.4.0. Thanks.
*** This bug has been marked as a duplicate of 10538 ***