title: Initializing circular data in C. Is this valid C code according to any standard?
body: <p>I wanted to see if I could initialize a global variable to point to itself:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  struct foo { struct foo *a, *b; } x = { &amp;x, &amp;x };
  int main()
  {
      printf("&amp;x = %p, x.a = %p, x.b = %p\n", &amp;x, x.a, x.b);
      return 0;
  }
  </code></pre>
  
  <p>This code compiles and runs as expected with <code>gcc</code> (all three pointers print identically).</p>
  
  <p>I want to know:</p>
  
  <ol>
  <li>Is this reliable?</li>
  <li>Is this standard?</li>
  <li>Is this portable?</li>
  </ol>
  
  <p><strong>EDIT:</strong> Just to clarify, I am questioning the availability of the address of <code>x</code> in its own initializer.</p>