Hi Guys ,<div><br></div><div>gcc pop up with the  error for the below sample </div><div><div><br></div><div>[root@insiscssgs06 ~]# cat  test.c</div><div>int main()</div><div>{</div><div> int i ;</div><div> int a[ const i =10] ;</div>
<div> while (i <10)</div><div> a[i++]=i;</div><div>}</div></div><div><br></div><div><div><font color="#ff0000">[root@insiscssgs06 ~]# gcc  test.c</font></div><div><font color="#ff0000">test.c: In function âmainâ:</font></div>
<div><font color="#ff0000">test.c:4: error: static or type qualifiers in non-parameter array declarator</font></div></div><div><div><br></div><div>[root@insiscssgs06 ~]# gcc  --version</div><div>gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)</div>
<div><br></div></div><div>But ,The same compiles with clang </div><div><div><br></div><div>[root@insiscssgs06 ~]# clang --version</div><div>clang version 3.2 (trunk) (llvm/trunk 158444)</div><div>Target: i386-pc-linux-gnu</div>
<div>Thread model: posix</div><div>[root@insiscssgs06 ~]# clang test.c</div></div><div><br></div><div>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 ???</div>
<div><br></div><div>Please forgive me ,if its not the right group.</div><div><br></div><div>Thanks </div><div>~Umesh </div><div><br></div><div><br></div>