[Issue 22926] importC: cast to D type alias in array length gives syntax error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 31 06:37:35 UTC 2022


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

--- Comment #4 from Walter Bright <bugzilla at digitalmars.com> ---
The idea is that if the C code is using __import, then it has already diverged
from using Standard C, so __cast is more palatible.

The fundamental issue here is the compiler cannot recognize cast expressions
100% when the type is an identifier, without knowing if that identifier is a
typedef or not. Importing files that haven't been parsed yet means no typedef
symbol table is available. Requiring the import files to be parsed first puts
an ordering on the parsing that I'd really like to avoid.

--


More information about the Digitalmars-d-bugs mailing list