[Issue 23189] importC: 0 pointer cast doesn't compile
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jun 15 20:36:41 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23189
--- Comment #1 from ryuukk_ <ryuukk.dev at gmail.com> ---
Here is a usable code to test:
```
struct nk_table {
void* test;
};
union nk_page_data {
struct nk_table tbl;
};
void test(void)
{
struct nk_table *tbl;
union nk_page_data *pd = (union nk_page_data*)((void*)((char*)(1 ? (tbl):
&((union nk_page_data*)0)->tbl) - (__builtin_offsetof(union
nk_page_data,tbl))));
}
```
--
More information about the Digitalmars-d-bugs
mailing list