struct op { char text[4]; }; struct op ops[] = { { "123" } }; char *x[] = { ops[0].text }; Error: static variable `ops` cannot be read at compile time
Simplified: struct op { char text[4]; }; struct op ops[] = { { "123" } }; char *y = ops[0].text;
@WalterBright updated dlang/dmd pull request #13948 "fix Issue 22971 - importC: can't initialize unsigned char array with …" fixing this issue: - fix Issue 22972 - importC: static variable cannot be read at compile time https://github.com/dlang/dmd/pull/13948
@WalterBright created dlang/dmd pull request #13949 "fix Issue 22972 - importC: static variable cannot be read at compile …" fixing this issue: - fix Issue 22972 - importC: static variable cannot be read at compile time https://github.com/dlang/dmd/pull/13949
dlang/dmd pull request #13949 "fix Issue 22972 - importC: static variable cannot be read at compile …" was merged into master: - 0072b8ad6251c57d78651baa0ca7ff6adda60f71 by Walter Bright: fix Issue 22972 - importC: static variable cannot be read at compile time https://github.com/dlang/dmd/pull/13949