title: Aliasing through unions
body: <p>The <code>6.5(p7)</code> has a bullet about <code>union</code>s and <code>aggregate</code>s:</p>
  
  <blockquote>
    <p>An object shall have its stored value accessed only by an lvalue
    expression that has one of the following types:</p>
    
    <p>[...]</p>
    
    <p>— an aggregate or union type that includes one of the aforementioned
    types among its members (including, recursively, a member of a
    subaggregate or contained union), or</p>
  </blockquote>
  
  <p>This is not quite clear what it means. Does it require at <em>least one member</em> or <em>all members</em> to satisfy the strict aliasing rule. Particularly about <code>union</code>s:</p>
  
  <pre><code>union aliased{
      unsigned char uint64_repr[sizeof(uint64_t)];
      uint64_t value;
  };
  
  int main(int args, const char *argv[]){
      uint64_t some_random_value = 123;
      union aliased alias;
      memcpy(&amp;(alias.uint64_repr), &amp;some_random_value, sizeof(uint64_t));
      printf("Value = %" PRIu64 "\n", alias.value);
  }
  </code></pre>
  
  <p><a href="http://coliru.stacked-crooked.com/a/4f82ff7ec75a303a" rel="nofollow noreferrer">DEMO</a></p>
  
  <p>Is the behavior of the program well-defined? If no, what does the bullet mean?</p>