title: Format printing the 64bit integer -1 as hexadecimal deviates between golang and C
body: <p>I'm recently reading the <a href="https://golang.org/doc/effective_go.html#printing" rel="nofollow noreferrer">effective_go</a> document, and got shocked that a <code>%x</code> format printing on an integer value <code>-1</code> results to <code>&quot;-1&quot;</code>:</p>
  <pre><code>var x uint64 = 1&lt;&lt;64 - 1
  fmt.Printf(&quot;%d %x; %d %x\n&quot;, x, x, int64(x), int64(x))
  </code></pre>
  <p>prints</p>
  <pre><code>18446744073709551615 ffffffffffffffff; -1 -1
  </code></pre>
  <p>Comes from C language I assume the output of <code>%x int64(x)</code> should also be <code>ffffffffffffffff</code>, I think this is the original purpose of <code>%x</code> yes? Have you ever seen a hexadecimal number getting a sign before it? like this?</p>
  <pre><code>-1
  -3A
  -A3
  </code></pre>