Comment #0 by Patrick.Schluter — 2023-05-04T12:06:16Z
I tested ImportC on the code base of the project I'm in charge of at European Commission. While there is no plans yet to use D, it might still be of interest to discover the difficulties encountered.
I had for the moment 3 issues that the ImportC compiler was not able to compile:
- enum constants bigger than uint. Full in undefined behaviour territory according to the standard, gcc defines the behaviour and defines enums as long/unsigned long/long long/unsigned long long if necessary. ImportC rejects for instance
Error: enum member `lang.LANID_TYPE.LANID_GL` enum member value `4294967296LU` does not fit in an `int`
- #ident / #sccs this gcc old fashioned pre-processor directive is not supported even if cpp is used by the compiler as pre-processor.
Error: C preprocessor directive `#ident` is not supported
- VLA (variable length arrays) do not work.
Error: variable `ilen` cannot be read at compile time
Even replacing VLA with alloca() does not work/
Error: undefined identifier `__builtin_alloca`
Comment #1 by bugzilla — 2023-05-05T08:21:40Z
This is actually 4 bug reports (!) so I split it up into 4 separate issues: 23886, 7, 8 and 9.
Thanks for taking the time to report them!