title: Compound literals in MSVC
body: <p>In GCC, I'm able to do this:</p>
  
  <pre><code>(CachedPath){ino}
  inode-&gt;data = (struct Data)DATA_INIT;
  </code></pre>
  
  <p>where:</p>
  
  <pre><code>struct CachedPath
  {
      Ino ino;
  };
  
  typedef int8_t Depth;
  struct Data
  {
      Offset size;
      Blkno root;
      Depth depth;
  };
  #define DATA_INIT {0, -1, 0}
  </code></pre>
  
  <p>MSVC gives the following error for these kind of casts:</p>
  
  <pre><code>error C2143: syntax error : missing ';' before '{'
  </code></pre>
  
  <p><strong>How can I do this in MSVC?</strong> Further note that the code has been converted from C99, where I used designated initializers for this, and then cast it similarly. Any clarity on how these various features relate between C99, and MSVC/GCC implementations of C++ is appreciated.</p>