Hi Oza,
You're running into a GNU extension to C89, and a standard part of C99.
$ gcc -pedantic -std=c99 -W -Wall -Wno-unused-variable c99.c
No error messages.
$ gcc -pedantic -std=c89 -W -Wall -Wno-unused-variable c99.c c99.c: In function `main': c99.c:11: warning: ISO C89 forbids mixed declarations and code
Error messages.
HTH, --Eljay