title: Memory layout of union of different sized member?
body: <pre><code>typedef union epoll_data
  {
    void        *ptr;
    int          fd;
    __uint32_t   u32;
    __uint64_t   u64;
  } epoll_data_t;
  </code></pre>
  
  <p>Here <code>int</code> and <code>__uint32_t</code> are 4 bytes,while the others are 8 bytes.</p>
  
  <p>When we set <code>fd</code> to an <code>int</code>,does it lie on the first 4 bytes or the last 4 bytes,or does it depend on endianness?</p>
  
  <p>Some reason is appreciated.</p>