LLVM interface is unstable.
That said there are things you can't properly implement by compiling to C.
LLVM interface is unstable.
That said there are things you can't properly implement by compiling to C.
Very interesting claim, any examples?
[0]: https://en.wikipedia.org/wiki/Threaded_code#Direct_threading [1]: https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html
This is what Nim does: https://nim-lang.org/docs/manual.html#pragmas-computedgoto-p...
• You don't control your stack and stack frames. You can't implement a segmented stack, for example.
• You have very limited options for unwinding. setjmp doesn't really cut it. You could leverage C++ exceptions or platform-specific things like SEH, but you can't design anything radically different.
• You can't have debug information fancier than #line and maybe reusing C++ name mangling. You can't make debuggers see your higher-level constructs and data as anything other than their lowering.
• You have very limited options for specifying pointer aliasing.
• If you don't want to inherit UB from C, you'll have to be very clever about using alternative constructs that don't cause UB while still compile to efficient code you wanted.
• If you mean standard C, not C with compiler extensions, then look at the whole list of non-standard intrinsics and built-ins for things C can't do.