%zd not recognised correctly

Andreas Jaeger aj@suse.de
Wed Mar 8 04:40:00 GMT 2000


The following simple program:
#include <stdio.h>

int
main (void)
{
  size_t i;
  i = 0;
  
  printf ("%zd", i);
  return 0;
}

gives this warning:
$ /opt/gcc-2.96/bin/gcc -Wall testz.c 
testz.c: In function `main':
testz.c:9: warning: unsigned int format, size_t arg (arg 2)

I'm using gcc CVS current (with strlensi patch from Jan Hubicka):
/opt/gcc-2.96/bin/gcc -v            
Reading specs from /opt/gcc-2.96/lib/gcc-lib/i686-pc-linux-gnu/2.96/specs
gcc version 2.96 20000307 (experimental)

My system: Linux 2.2.14, glibc 2.1.3, i686.

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de


More information about the Gcc-bugs mailing list