[Issue 23958] New: ImportC: undefined identifier `__builtin__sprintf_chk`
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jun 3 16:02:11 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23958
Issue ID: 23958
Summary: ImportC: undefined identifier `__builtin__sprintf_chk`
Product: D
Version: D2
Hardware: x86
OS: Mac OS X
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: mail at tomaskral.sk
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
--
More information about the Digitalmars-d-bugs
mailing list