https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97884
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |msebor at gcc dot gnu.org --- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- Compiling with -Wall should issue a warning pointing out the problem: $ cat pr97884.c && gcc -O2 -S -Wall pr97884.c void f (void) { __builtin_printf ("%i\n", -2147483648); __builtin_printf ("%i\n", (int)-2147483648); } pr97884.c: In function 'f': pr97884.c:3:23: warning: format '%i' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=] 3 | __builtin_printf ("%i\n", -2147483648); | ~^ ~~~~~~~~~~~ | | | | int long long int | %lli