title: assigning a value to a long long integers using gcc on sparc solaris
body: <p>I came across something that I think rather strange.  The test program</p>
  
  <pre><code>int main(int argc, char* argv[])
  {
      cout&lt;&lt;"hello"&lt;&lt;endl;
      long unsigned l = 0x12345678;
      long long unsigned ll =  0x12345678;
      cout&lt;&lt;sizeof(l)&lt;&lt;endl;
      cout&lt;&lt;sizeof(ll)&lt;&lt;endl;
  };
  </code></pre>
  
  <p>output is:</p>
  
  <pre><code>hello    
  4    
  8
  </code></pre>
  
  <p>No surprises there. The <code>long int</code> has a size of 4 bytes and the <code>long long</code> has a size of 8 bytes.
  However, when I change it so that the long long is assigned</p>
  
  <pre><code>long long unsigned ll =  0x123456789;
  </code></pre>
  
  <p>at compile time I get</p>
  
  <pre><code>error: integer constant is too large for "long" type
  </code></pre>
  
  <p>Now this same test <em>does</em> compile if I force a 64 bit build using the option <code>-m64</code>. Am I doing something wrong or is this a bug in GCC?</p>