title: Incrementing a variable used twice in an initializer list - undefined behavior?
body: <p>Edit: Not already answered - the linked question was about ordinary r-values, initializer lists are a separate, if related concept.</p>
  
  <p>Is this statement well-defined, or is using the prefix increment operator in an initializer list, on a variable that appears twice in the list, undefined behavior?</p>
  
  <pre class="lang-c prettyprint-override"><code>struct T t = { i, ++i };
  </code></pre>
  
  <p>I'm most interested in ANSI C, but it'd also be useful to know if other versions of C and/or C++ differ. And if similar constructs like the following are legal:</p>
  
  <pre class="lang-c prettyprint-override"><code>struct T t = { i, i++ };
  
  struct T t = { ++i, ++i };
  
  struct T t = { i++, ++i };
  
  struct T t = { i++, i++ };
  </code></pre>