We currently reject this valid C construct by claiming it declares a non-local variable: for (struct { int i; } s={0}; s.i != 0; s.i--) ;
The problem is that we expect all declaration in the clause-1 declaration statement to be VarDecls of local variables, but there can be other declarations involved such as a tag declaration. We now ignore tag declarations when deciding whether the clause-1 declarations are valid or not. This fixes PR35757.
You can have multiple tag declarations because of complex declarators or type-specifiers, e.g. struct A (*var)(struct B) or _Atomic(struct A(*)(struct B)). It should already be an error to write the latter without a declarator, but you do need to not diagnose if there *is* a declarator. Probably the right way to write this is to ignore tags in the first walk but remember whether you saw a non-tag; if you don't, diagnose the first tag.