Here is the example code:<div><br></div><div><div>class A { </div><div>  const int x[5];</div><div>public:</div><div>  //A() { x[0] = 1; x[1] = 1; x[2] = 2; x[3] = 3; x[4] = 4; }</div><div>  A():x((const int[5]){1,2,3,4,5}) {}</div>

<div>  int getV(int idx) { return x[idx];}</div><div>};</div><div><br></div><div>//const int A::x[5] = { 1, 2, 3, 4, 5 };</div><div><br></div><div>int main() {</div><div>  A a;</div><div>  return a.getV(1);</div><div>}</div>

<div><br></div><div><br></div><div>gcc 4.1.2 can compile the above code.</div><div><br></div><div>llvm-gcc reports:</div><div><br></div><div><div>x.cpp: In constructor \u2018A::A()\u2019:</div><div>x.cpp:5: error: array used as initializer</div>

<div><br></div><div><br></div><div>am i missing something?</div></div></div>