Initialization of Aggregates with non Constants

The initialization of aggregates with non-constants is not allowed in the ANSI-C specification. The Compiler allows it if the -Ansi: Strict ANSI compiler option is not set (see the following listing).

Listing: Initialization using a non constant


void main() {

  struct A {

    struct A *n;

  } v={&v}; /* the address of v is not constant */

}