title: printf() format specifier for int64_t and uint64_t in 32-bit ANSI C
body: <p>I'm writing some 32-bit ANSI C, compiling with <code>gcc</code>, in which I need to print some 64-bit signed and unsigned integers. The problem is that in <code>gcc</code> 32-bit C, <code>int64_t</code> and <code>uint64_t</code> get converted to long long int and unsigned long long int respectively, with format specifier <code>%lld</code> and <code>%llu</code>, which are not supported by ANSI C. Using the format specifier macros provided in <code>inttypes.h</code> don't help either, since those get converted to <code>%lld</code> and <code>%llu</code>.</p>
  
  <p>The following code fails to compile:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;inttypes.h&gt;
  
  int main() {
      uint64_t some_int = 123456789;
      printf("Your int is: %"PRId64"\n", some_int);
      return 0;
  }
  </code></pre>
  
  <p>Compiled with <code>gcc main.c -ansi -Og -g -m32 -Wall -Werror -Wextra -pedantic</code></p>
  
  <p>Error message is:</p>
  
  <pre><code>error: ISO C90 does not support the ‘ll’ gnu_printf length modifier [-Werror=format=]
  </code></pre>
  
  <p>So, my question is: What format specifier should I use to print double-length integers in 32-bit ANSI C?</p>