When compiling the test with `gcc -std=c11 -fsyntax-only`
compilable/cppflags.c:4:16: error: ‘ABC’ undeclared here (not in a function)
4 | _Static_assert(ABC == 3, "1");
| ^~~
compilable/cppflags.c:4:16: error: expression in static assertion is not an integer
Original test content:
```
/*************************************************/
// https://issues.dlang.org/show_bug.cgi?id=22398
const int a;
int b = a;
```
(In reply to Iain Buclaw from comment #0)
> compilable/cppflags.c:4:16: error: ‘ABC’ undeclared here (not in a function)
> 4 | _Static_assert(ABC == 3, "1");
> | ^~~
> compilable/cppflags.c:4:16: error: expression in static assertion is not an
> integer
Actual error
compilable/ctests2.c: At top level:
compilable/ctests2.c:51:9: error: initializer element is not constant
51 | int b = a;
| ^
Comment #3 by dlang-bot — 2023-02-21T07:26:45Z
@WalterBright created dlang/dlang.org pull request #3535 "fix Issue 23694 and Issue 23700 Document ImportC CTFE" fixing this issue:
- fix Issue 23694 and Issue 23700 Document ImportC CTFE
https://github.com/dlang/dlang.org/pull/3535
Comment #4 by dlang-bot — 2023-02-21T07:53:42Z
dlang/dlang.org pull request #3535 "fix Issue 23694 and Issue 23700 Document ImportC CTFE" was merged into master:
- f89e67a7d88bc5792d2dec37620ab49180edc60a by Walter Bright:
fix Issue 23694 and Issue 23700 Document ImportC CTFE
https://github.com/dlang/dlang.org/pull/3535
Comment #5 by ibuclaw — 2023-02-21T09:35:40Z
*** Issue 23700 has been marked as a duplicate of this issue. ***