This is really cool to see. Back when C++ compatibility in compilers was generally terrible in the late 1990s and early 2000s, you'd always hear stories about the compatibility level of EDG's frontend. I didn't get to use an EDG-based compiler until working with the Green Hills toolchains for some of Nintendo's consoles.
At least as far as my knowledge extends this is one of the four still extant C++ front ends (Clang, GCC, and MSVC being the others).
One thing that surprised me when I asked him about it years ago is that Sean Baxter's Circle is an independent C++ front-end implementation, in addition to the Circle-specific features. I'd previously assumed that he'd started with the Clang front-end.
Ah, Circle had completely slipped my mind. It's quite an impressive achievement IMO. Shame Sean didn't seem to have found sufficient interest to continue work on it.
Looking at the source code just now in github, this appears to be one of the only remaining "modern" C++ compilers written in C. Clang, GCC, are now written in C++. No idea about MSVC.
I think there's a mix of C++ and either C or C-style C++? There's definitely C++-only features used in places (e.g., a reference in a function signature here, a template here), but those seem to be relatively rare in the brief search I did.
I'd guess the mix of styles is in no small part due to the age of the codebase. The first commit is from 1990!
For the first 30 years or so, it was C89 code. Then we switched to C++11, but to minimize disruption to customers, we kept the file extensions unchanged. C++ was only introduced in new code, and even for new code we often stuck to existing C-based idioms. The modules code started after the switch to C++, and so has more of a C++ flavor.
I've been excited for this for a while. Mostly because the current live-bootstrap project uses an older version of GCC from back when it was written in C to go from C to C++. This adds an actual option for going from C to C++ that doesn't rely on very old compilers that only really support x86.
I'm looking forwards to seeing new compilers based on this.
I don't think this would work as-is for bootstrapping C++ from C? It uses C++ in places, though to be fair I have no idea how easy/hard it would be to replace those with C.
pervognsen | 21 hours ago
This is really cool to see. Back when C++ compatibility in compilers was generally terrible in the late 1990s and early 2000s, you'd always hear stories about the compatibility level of EDG's frontend. I didn't get to use an EDG-based compiler until working with the Green Hills toolchains for some of Nintendo's consoles.
One thing that surprised me when I asked him about it years ago is that Sean Baxter's Circle is an independent C++ front-end implementation, in addition to the Circle-specific features. I'd previously assumed that he'd started with the Clang front-end.
[OP] aw1621107 | 20 hours ago
Ah, Circle had completely slipped my mind. It's quite an impressive achievement IMO. Shame Sean didn't seem to have found sufficient interest to continue work on it.
Lilian | 2 hours ago
He does still work on it, just only inside Nvidia.
[OP] aw1621107 | 30 minutes ago
Oh, TIL. Is he working on Circle there in an official capacity or is it still on the side?
nutmeg | 8 hours ago
hopefully Sean can open source Circle, it is quite neat.
There's also https://serjective.org/aburi/ but it seems to be in pre-alpha development.
drs | 22 hours ago
Looking at the source code just now in github, this appears to be one of the only remaining "modern" C++ compilers written in C. Clang, GCC, are now written in C++. No idea about MSVC.
[OP] aw1621107 | 20 hours ago
I think there's a mix of C++ and either C or C-style C++? There's definitely C++-only features used in places (e.g., a reference in a function signature here, a template here), but those seem to be relatively rare in the brief search I did.
I'd guess the mix of styles is in no small part due to the age of the codebase. The first commit is from 1990!
drs | 20 hours ago
Yeah, you are right. I guess the .c file extension threw me off.
[OP] aw1621107 | 13 hours ago
You might be interested in this comment from a former EDG dev:
[OP] aw1621107 | 20 hours ago
I think your first impression is very understandable, to be fair. It looks like the use of C++ features is relatively sparse so it'd be easy to miss.
notgull | 20 hours ago
I've been excited for this for a while. Mostly because the current
live-bootstrapproject uses an older version of GCC from back when it was written in C to go from C to C++. This adds an actual option for going from C to C++ that doesn't rely on very old compilers that only really support x86.I'm looking forwards to seeing new compilers based on this.
[OP] aw1621107 | 19 hours ago
I don't think this would work as-is for bootstrapping C++ from C? It uses C++ in places, though to be fair I have no idea how easy/hard it would be to replace those with C.
Lilian | 2 hours ago
The Orange C++ compiler for Windows is still actively maintained to this day https://github.com/LADSoft/OrangeC
For years they claimed C++14 but recently started supporting C++17
[OP] aw1621107 | 19 minutes ago
Interesting, haven't heard of that compiler before. Do you know where it's used?
pervognsen | 21 hours ago