------- Comment #5 from reichelt at gcc dot gnu dot org 2006-03-07 15:54 ------- Here's an example where the code is invalid, but is accepted because of the for-scope-warning machinery:
================================== namespace N { int i; } int i; void foo() { for (int i=0; i<10; ++i) ; using namespace N; i; } ================================== The problem is that we track old and new scoping rules simultaneously to be able to issue warnings. This doesn't work properly in corner cases like in this PR. -- reichelt at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10852