Non static data initialization

Automatic scalar variables can be initialized. However automatic array/structure/union variables cannot be initialized: this behaviour corresponds to the old K&R standard, but is a deviation from the ANSI standard.

void f()
{
  float x = 3.14, x2 = 2 * x  ;  // OK
  int t[] = { 1, 2, 3 } ;        // NOT SUPPORTED
  /* ... */
}



AG 2013-04-10