Compiling the following C code on macOS:
#include <stdio.h>
int main() {
char buf[8];
sprintf(buf, "%d", 123);
}
fails with an error:
main.c(5): Error: undefined identifier `__builtin___sprintf_chk`
Running the same C code through the preprocessor shows that `sprintf` is replaced with:
__builtin___sprintf_chk (buf, 0, __builtin_object_size (buf, 2 > 1 ? 1 : 0), "%d", 123);
I'm using macOS 12.6, DMD v2.104.0