title: Union of long and char[], byte order
body: <p>If I do the following in code for an 8-bit processor:</p>
  
  <pre><code>typedef union
  {
  unsigned long longn ;
  unsigned char chars[4];
  } longbytes;
  </code></pre>
  
  <p>Is <code>longbytes.chars[0]</code> always going to be the lowest byte of <code>longbytes.longn</code>, or does it depend on endianness/compiler/platform/target/luck etc.?  I've viewed the disassembly of my complied code and that's how it is in my specific case, but I'm curious if this code is portable.</p>