‹ BackHN Continuity

Thread

EDG C++ front-end goes public

249 points · 129 comments · iandinwoodie

  1. vintagedave · · focus · HN ↗
    Wow. This is big news for C++.

    For background -- and I am not an expert here -- their C++ frontend is widely known. I first heard of it because Visual C++'s Intellisense uses it, which was notable because VC does not use the msvc frontend for its own completion. I understand it's been either used or evaluated for other frontends in the past too. I worked as PM for one C++ product, and was fortunate to be able to learn a lot from our engineers; we didn't use it, but they thought highly of EDG.

    It has a very strong reputation for being correct. And as such, I think open sourcing it will be a very beneficial thing for the C++ community.

    1. jcranmer · · focus · HN ↗
      There are essentially four C++ frontends: gcc, clang, MSVC, and EDG. Pretty much every C++ compiler is a reskinned version of one of those compilers. Most of the proprietary compilers have been slinking away from using EDG to using clang (e.g., Intel did this transition a few years ago).

      The reason why the EDG frontend is being open-sourced is because EDG itself is closing up shop, and the open sourcing is an interim solution as EDG's customers work on migrating to using Clang instead. So... it's really not good news, because it means that one of the frontends is basically reaching end-of-life.

      1. kvuj · · focus · HN ↗
        What about Green Hills?
        1. quuxplusone · · focus · HN ↗
          In my day (2006–2011) Green Hills used EDG's frontend. I have the vague impression they might have already switched away. (I know Intel ICC already switched to Clang a while ago.) I'd be very surprised to learn that GHS had ever developed their own frontend.
          1. AlotOfReading · · focus · HN ↗
            I'm surprised it was using EDG. My memory of green hills is that it would regularly crash on valid C++, to the point where I assumed it could only be a shitty homegrown implementation.
            1. quuxplusone · · focus · HN ↗
              > I'd be very surprised to learn that GHS had ever developed their own frontend.

              Actually I take that back. At the dawn of time (1982), GHS definitely had its own frontend. They switched to EDG sometime before my time. I meant I'd be surprised to learn they'd switched from EDG to something home-grown.

              This also meant that in my time there was a hefty "glue" layer between the EDG frontend and the GHS middle-end (the middle-end being the tree transformations and "indep" optimizations before you got into the back-end stuff): you had to take the structures EDG produced and turn them into the structures the GHS middle-end wanted.

              I was there right when John Regehr's Csmith was first making big waves. We started using it, and also rolled our own fuzzer with more focus on embedded-software trouble spots, such as `volatile` and `packed` and I forget what else. (Guy Goldstein originated and led this, as I recall.) I don't actually remember the fuzzer finding a lot of crashes, but maybe it did, and I do remember its finding a lot of miscompilations, i.e., bad optimizations.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.