[Issue 23213] New: ImportC
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jun 25 21:18:31 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23213
Issue ID: 23213
Summary: ImportC
Product: D
Version: D2
Hardware: x86_64
OS: All
Status: NEW
Severity: blocker
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: ryuukk.dev at gmail.com
The following code doesn't compile:
test.c(4): Error: variable `n` cannot be read at compile time
```
void hello()
{
int n = 0;
// some stuff
int fds[n == 0 ? 1 : n];
}
```
It is valid C code, taken from:
https://github.com/cesanta/mongoose/blob/2bbb2bb1dbbc134c390babd43e474028ede8e8a5/mongoose.c#L3921-L3923
--
More information about the Digitalmars-d-bugs
mailing list