title: How can I return an anonymous struct in C?
body: <p>Trying some code, I realized that the following code compiles:</p>
  <pre class="lang-c prettyprint-override"><code>struct { int x, y; } foo(void) {
  }
  </code></pre>
  <p>It seems as if we are defining a function named <strong><code>foo</code></strong> which returns an anonymous <strong><code>struct</code></strong>.</p>
  <p>Does it only happen to compile with my compiler or is this legal C(99)?</p>
  <p>If so, what is the correct syntax for a return statement and how can I correctly assign the returned value to a variable?</p>