Hi Guys ,
gcc pop up with the error for the below sample
[root@insiscssgs06 ~]# cat test.c
int main()
{
int i ;
int a[ const i =10] ;
while (i <10)
a[i++]=i;
}
[root@insiscssgs06 ~]# gcc test.c
test.c: In function âmainâ:
test.c:4: error: static or type qualifiers in non-parameter array declarator
[root@insiscssgs06 ~]# gcc --version
gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)
But ,The same compiles with clang
[root@insiscssgs06 ~]# clang --version
clang version 3.2 (trunk) (llvm/trunk 158444)
Target: i386-pc-linux-gnu
Thread model: posix
[root@insiscssgs06 ~]# clang test.c
According to c99 in the section 6.7 the clang is right.Before i report a bug in the GCC .Any thoughts or inputs or suggestions ???
Please forgive me ,if its not the right group.
Thanks
~Umesh