Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Aren't there C++ compilers that will compile to C code?

Uh ... no? CFront did that when it was just "C with Classes", but nowadays with C++14? That would be absolutely terrifying.



Arguably the most versatile compiler in the world is EDG's.

One of its features is: "a C-generating back end, which can be used to generate C code for C++ programs"

source: https://www.edg.com/index.php?location=c_frontend

In fact, the Itanium C++ ABI (which has no relation to the architecture) specifically uses valid C identifiers to mangle C++ names to support products like EDG.

source: http://mentorembedded.github.io/cxx-abi/abi.html#mangling-ty...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: