title: How to printf a size_t without warning in mingw-w64 gcc 7.1?
body: <p>I am using the mingw-w64 (x64) fork of minGW as prepared on nuwen.net. This is from the 7.1 version of gcc :</p>
  
  <pre><code>gcc --version
  gcc (GCC) 7.1.0
  </code></pre>
  
  <p>I am compiling this program:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(void)
  {
      size_t a = 100;
      printf("a=%lu\n",a);
      printf("a=%llu\n",a);
      printf("a=%zu\n",a);
      printf("a=%I64u\n",a);
  }
  </code></pre>
  
  <p>with warnings and c11 standard:</p>
  
  <pre><code>gcc -Wall -Wextra -Wpedantic -std=c11 test_size_t.c
  </code></pre>
  
  <p>and I get these warnings:</p>
  
  <pre><code>   test_size_t.c: In function 'main':
      test_size_t.c:6:14: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'size_t {aka long long unsigned int}' [-Wformat=]
        printf("a=%lu\n",a);
                  ~~^
                  %I64u
      test_size_t.c:6:14: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'size_t {aka long long unsigned int}' [-Wformat=]
        printf("a=%lu\n",a);
                  ~~^
                  %I64u
      test_size_t.c:7:14: warning: unknown conversion type character 'l' in format [-Wformat=]
        printf("a=%llu\n",a);
                    ^
      test_size_t.c:7:9: warning: too many arguments for format [-Wformat-extra-args]
        printf("a=%llu\n",a);
               ^~~~~~~~~~
      test_size_t.c:7:14: warning: unknown conversion type character 'l' in format [-Wformat=]
        printf("a=%llu\n",a);
                    ^
      test_size_t.c:7:9: warning: too many arguments for format [-Wformat-extra-args]
        printf("a=%llu\n",a);
               ^~~~~~~~~~
      test_size_t.c:8:13: warning: unknown conversion type character 'z' in format [-Wformat=]
        printf("a=%zu\n",a);
                   ^
      test_size_t.c:8:9: warning: too many arguments for format [-Wformat-extra-args]
        printf("a=%zu\n",a);
               ^~~~~~~~~
      test_size_t.c:8:13: warning: unknown conversion type character 'z' in format [-Wformat=]
        printf("a=%zu\n",a);
                   ^
      test_size_t.c:8:9: warning: too many arguments for format [-Wformat-extra-args]
        printf("a=%zu\n",a);
               ^~~~~~~~~
      test_size_t.c:9:9: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=]
        printf("a=%I64u\n",a);
           ^~~~~~~~~~~
      test_size_t.c:9:9: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=]
  </code></pre>
  
  <p>I would like to printf a size_t without warning but don't know the correct format specifier in this situation.</p>