[Issue 22926] New: importC: can't use offsetof in array length
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Mar 25 12:04:38 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=22926
Issue ID: 22926
Summary: importC: can't use offsetof in array length
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: ImportC, rejects-valid
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: duser at neet.fi
CC: duser at neet.fi
struct S { int x, y; };
char cs[ ((size_t)((char *)&((struct S *)0)->y - (char *)0)) ];
dmd v2.099.0:
Error: dereference of invalid pointer `cast(S*)0LU`
current git master:
Error: identifier or `(` expected
--
More information about the Digitalmars-d-bugs
mailing list