[Issue 24121] ImportC: typedef enum fails to compile when generating .di file
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Sep 12 00:29:07 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=24121
--- Comment #3 from Walter Bright <bugzilla at digitalmars.com> ---
The problem is that C code is not always representable as D code. D doesn't
have anonymous enum types, for example, which I'm pretty sure is the cause of
the seg fault.
One reason for ImportC is it enables the D compiler to accommodate exact C
semantics. The D compiler can import a C file, and use its declarations
directly. If the C file was converted to a .di file, then the D compiler can
import the .di file and use its declarations directly.
Consequently, there should be no need to covert a C file to a .di file.
--
More information about the Digitalmars-d-bugs
mailing list