Thread overview
[Issue 23694] compilable/ctests2.c:51:9: error: initializer element is not constant
Feb 12, 2023
Iain Buclaw
Feb 16, 2023
Iain Buclaw
Feb 16, 2023
Iain Buclaw
Feb 21, 2023
Dlang Bot
Feb 21, 2023
Walter Bright
Feb 21, 2023
Dlang Bot
Feb 21, 2023
Iain Buclaw
February 12, 2023
https://issues.dlang.org/show_bug.cgi?id=23694

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid, ImportC
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=23689
         Depends on|                            |23689


Referenced Issues:

https://issues.dlang.org/show_bug.cgi?id=23689
[Issue 23689] ImportC: C tests in the testsuite are not valid C
--
February 16, 2023
https://issues.dlang.org/show_bug.cgi?id=23694

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw@gdcproject.org

--- Comment #1 from Iain Buclaw <ibuclaw@gdcproject.org> ---
This is somewhat documented on https://dlang.org/spec/importc.html#ctfe

Perhaps some examples of what ImportC can do vs. GCC.

--
February 16, 2023
https://issues.dlang.org/show_bug.cgi?id=23694

--- Comment #2 from Iain Buclaw <ibuclaw@gdcproject.org> ---
(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;
      |         ^

--
February 21, 2023
https://issues.dlang.org/show_bug.cgi?id=23694

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
@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

--
February 21, 2023
https://issues.dlang.org/show_bug.cgi?id=23694

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=23700

--
February 21, 2023
https://issues.dlang.org/show_bug.cgi?id=23694

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
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

--
February 21, 2023
https://issues.dlang.org/show_bug.cgi?id=23694

--- Comment #5 from Iain Buclaw <ibuclaw@gdcproject.org> ---
*** Issue 23700 has been marked as a duplicate of this issue. ***

--
December 15, 2023
https://issues.dlang.org/show_bug.cgi?id=23694
Issue 23694 depends on issue 23689, which changed state.

Issue 23689 Summary: ImportC: C tests in the testsuite are not valid C https://issues.dlang.org/show_bug.cgi?id=23689

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--