gcc limits and -Wformat

#include <stdio.h> #include <limits.h> int main (void) { unsigned long ul = LONG_MAX; short int si = SHRT_MIN; printf (“%d\n”, ul); printf (“%s\n”, si); return 0; } $gcc printme.c $./a.out -1 Segmentation fault $gcc printme.c -Wformat printme.c: In function ‘main’: printme.c:7: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long unsigned int’ …