Mismatch between gint64 and int64_t on 64-bit macOS/BSD
Submitted by John Ralls
Link to original bug (#741488)
Description
Unlike most other Unixes, Apple typdefs int64_t to long long without qualification, and when building with -arch x86_64 sizeof(long) and sizeof(long long) are both 8.
Glib sets gint64 based on finding the smallest of int, long, and long long with a size of 8, which results in this case with gint64 being typedeffed to long. This causes int64_t foo = 10; gint64 bar = foo; //Warns about a type mismatch printf (G_GINT64_FORMAT, foo); //Warns about wrong type for format.
Version: 2.43.x
Edited by Philip Withnall