CTFE C compiler
Johan Engelen via Digitalmars-d
digitalmars-d at puremagic.com
Mon Nov 21 02:41:27 PST 2016
In LLVMweekly [1], I read the following:
"You may be be interested, amazed, and/or horrified to learn of
constexpr-8cc [2]. It provides a compile-time C compiler
implemented as C++14 constant expressions."
The constexpr compiler is generated using ELVM [3], a C compiler
that targets a bunch of other languages (instead of targeting
machine code). The constexpr compiler was built by adding a
C++14-constexpr target to ELVM. [4]
A fun project: add a D CTFE backend? ;)
cheers,
Johan
[1] http://llvmweekly.org/issue/151
[2] https://github.com/kw-udon/constexpr-8cc
[3] https://github.com/shinh/elvm
[4]
https://github.com/shinh/elvm/commit/b6e2fed3326d57d05f1a354938bd3b9545ab701b
More information about the Digitalmars-d
mailing list