3 ms·
Aren't there C++ compilers that will compile to C code? Doesn't that effectively make C++ just as portable as C?
by KeytarHero 12y ago
Aren't there C++ compilers that will compile to C code? Doesn't that effectively make C++ just as portable as C?
- byuu 12y ago> 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.
- cokernel_hacker 12y agoArguably 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 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-type http://mentorembedded.github.io/cxx-abi/abi.html#mangling-ty...