Following code does compile in gcc 4.5 but it is not being compiled in visual c 2005.
int main()
{
int len;
len = 32;
char buff[len];
return 0;
}
I know that i am declaring array after statment, which is against ANSI C rules.
But why GCC does not give any error or warning, and in visual c, it gives error like,
error C2143: syntax error : missing ';' before 'type'
any ideas?
Thanks.
Your C code is not C90 compliant.
gcc -pedanticwill warn about this.