Bug 23580 – ImportC: undefined identifier `__builtin___memcpy_chk

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Mac OS X
Creation time
2022-12-27T19:37:08Z
Last change time
2023-01-14T21:34:03Z
Keywords
ImportC
Assigned to
No Owner
Creator
Jacob Carlborg
See also
https://issues.dlang.org/show_bug.cgi?id=23581, https://issues.dlang.org/show_bug.cgi?id=23582, https://issues.dlang.org/show_bug.cgi?id=23583

Comments

Comment #0 by doob — 2022-12-27T19:37:08Z
Compiling the following C code: #include <string.h> void foo() { memcpy(0, 0, 0); } Results in the following error: foo.c(5): Error: undefined identifier `__builtin___memcpy_chk` If I run the C code manually through the preprocessor "memcpy" is replaced with "__builtin___memcpy_chk". I'm using macOS 13.0.1, DMD v2.101.1 and Xcode 14.2.
Comment #1 by doob — 2022-12-27T19:53:08Z
If I run the C code manually through the preprocessor this is the relevant output: void foo() { __builtin___memcpy_chk (0, 0, 0, __builtin_object_size (0, 0)); }
Comment #2 by bugzilla — 2023-01-12T05:07:10Z