On Thu, 22 Jun 2023 14:03:26 GMT, Daniel Jeliński <djelin...@openjdk.org> wrote:
>> gcc will crash with a warning about a mismatched format specifier between >> signed and unsigned if this isn't done, unfortunately > > Which gcc? This code compiles without warnings: > > #include <stdio.h> > int main() { > unsigned long i = 1; > long j = 2; > printf("%ld %ld %lx %lx %lu %lu\n", i, j, i, j, i, j); > return 0; > } > > > # gcc -Wall -Wextra -Wformat=2 test.c > # gcc --version > gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 > Copyright (C) 2019 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I'm currently running version 13.1, win32 threads ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14125#discussion_r1238583171