[Issue 23187] New: importC: __builtin_offsetof still doesn't work
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jun 14 19:42:52 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23187
Issue ID: 23187
Summary: importC: __builtin_offsetof still doesn't work
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: blocker
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: ryuukk.dev at gmail.com
This was supposed to be fixed with PR:
https://github.com/dlang/druntime/pull/3739
But it still doesn't work
bar.c(8): Error: undefined identifier `__builtin_offsetof`
--- test.d
import std.stdio;
import c = bar;
void main()
{
c.something s;
c.test(&s);
writeln(s);
}
--- bar.c
typedef struct
{
int offset;
} something;
void test(something* s)
{
s->offset = __builtin_offsetof(something, a);
}
--
More information about the Digitalmars-d-bugs
mailing list