www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23581] New: undefined identifier `__builtin_object_size`

https://issues.dlang.org/show_bug.cgi?id=23581

          Issue ID: 23581
           Summary: undefined identifier `__builtin_object_size`
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Mac OS X
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: doob me.com

Compiling the following C code (after fixing
https://issues.dlang.org/show_bug.cgi?id=23580):

#include <string.h>

void foo()
{
    memcpy(0, 0, 0);
}

Results in the following error:

foo.c(5): Error: undefined identifier `__builtin_object_size`

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));
}

I'm using macOS 13.0.1, DMD v2.101.1 and Xcode 14.2.

--
Dec 27 2022