February 08 [Issue 24375] New: ImportC: .di generator outputs C expression with `->` operator | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24375 Issue ID: 24375 Summary: ImportC: .di generator outputs C expression with `->` operator Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: ImportC Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: dave287091@gmail.com C code: struct foo { int x; }; typedef int weird[sizeof(((struct foo *)((void*)0))->x)]; outputs: extern(C) { // ... struct foo { int x = void; } alias weird = int[(cast(foo*)cast(void*)0)->x.sizeof]; // ... } Encountered something like this in an SDL header. -- |
Copyright © 1999-2021 by the D Language Foundation