More recent Perl's compiled with gcc should have -Wdeclaration-after-statement. Also, you can add it as a ccflag in Makefile.PL.
[EMAIL PROTECTED]:~$ cat test.c int main() { for(int i = 0; i < 5; i++); int j = 0; } [EMAIL PROTECTED]:~$ cc -o test -Wdeclaration-after-statement test.c test.c: In function 'main': test.c:3: error: 'for' loop initial declaration used outside C99 mode test.c:4: warning: ISO C90 forbids mixed declarations and code