http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48483
--- Comment #14 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-04-07 13:39:45 UTC --- (In reply to comment #13) > (In reply to comment #10) > > (In reply to comment #9) > > > > > No, the variable is in scope after its identifier, so it can be used in > > > the > > > initializer expression, e.g. > > > > > > int i = sizeof(i); // ok > > > int i = i+1; // not ok > > > > My opinion is that C habit rules here. > > > > In C > > > > int i=i+1; -> int i; i=i+1; > > In C++ this can be written: > > int i(i+1); > > The initialization rules for C++ do ... not care if the type is a class or not, the variable name is still in scope before the initializer is parsed.