EDG C/C++ Compiler Is Open Source: What You Get
A C++ front end that deliberately copies the quirks of GCC, Clang and MSVC, plus back ends, a prelinker and IL tools, all now on GitHub. Here is what is in it and what is missing.

If you build tools that have to read real-world C++ (static analysers, refactoring engines, code generators, IDE back ends), the front end is the hardest part. Parsing modern C++ correctly is difficult. Parsing it the way your users' production compilers parse it, quirks included, is harder still. Code that builds cleanly under GCC, Clang or MSVC but is rejected by your tool earns you a bug report, not a feature request.
The edgcpp/compiler repository on GitHub now hosts what it calls the open source EDG C/C++ compiler project. Its main focus is the EDG front end. The README says that front end is built so that source which compiles with Clang, GCC and MSVC also compiles with EDG, and that it is meant to be configured and derived into many C/C++ products.
This article covers what the repository contains, how to get it, and where it stops being useful.
What the repository actually contains
The front end is the core, but the project ships several other components around it. According to the README, the repository includes:
- a C-generating back end, which can produce C code from C++ programs
- a C++-generating back end, intended for source-to-source transformation
- a prelinker that handles automatic template instantiation
- a minimal runtime support library, explicitly not including 'real' libraries such as stream I/O
- utilities to write the intermediate language to a file, read it back in, and display it in human-readable form
- a name demangler
- a collection of purpose-built development tools
The IL utilities are the part to look at first if you plan to build something on top of the front end. Being able to serialise the intermediate language, reload it and dump it in readable form lets you split parsing from analysis. You can inspect what the front end produced for a given construct without attaching a debugger to the parser. The C++-generating back end matters for the same group of users. If your product rewrites source rather than compiling it, you need to get compilable C++ back out, not just a tree.
Bug emulation as a design goal
The README lists three things the front end is known for. The first is parsing compatibility and bug emulation. Most compiler projects treat divergence from the standard as something to fix. Here, matching the behaviour of other compilers, including their bugs, is the stated goal, so that code accepted by Clang, GCC and MSVC is also accepted by EDG.
For a tool vendor this is the property that matters. Your users do not write ISO C++. They write whatever their production compiler accepts, and that often relies on extensions and lenient handling that a strict front end would reject. A front end that can be configured to behave like the user's compiler cuts the class of 'works in my build, fails in your tool' reports.
The other two properties support that use. The README calls the documentation extensive, written to help with development and modification. It calls the configurability extreme, so the front end can be derived for use in many C/C++ products. Configurability is what lets one codebase pose as several compilers' dialects.
Cloning and building
The project recommends a partial clone for most people:
git clone --filter=blob:none git@github.com:edgcpp/compiler.gitThe --filter=blob:none flag keeps the full commit history but downloads only the latest version of each file. Git fetches older blobs on demand when you run something that needs them, such as git log -p or git blame on an old path. You get a smaller initial download and still keep a history you can bisect. Those on-demand fetches need network access, so plan for that if you work on an air-gapped build machine.
The URL in that command is the SSH form, so it needs an SSH key registered with GitHub. If you don't have one, use the HTTPS remote https://github.com/edgcpp/compiler.git with the same filter flag. The README points to separate build instructions for building and using the front end. Anyone planning to change it should read the contribution guide and the development guide.
Documentation, including for agents
Release documentation is published at edgcpp.org/doc, and documentation for the main development branch is at edgcpp.org/dev/doc. Keep track of which one you are reading. If you build from main and read the release docs, or the reverse, expect configuration details that don't match your checkout. A documentation build guide covers producing a local copy, which helps if you pin to a specific commit.
One detail in the README stands out. It describes a development annex of tips, tricks and tutorials meant to help 'humans and AI agents' with product development. The project is openly planning for coding agents to work against its documentation. If you use agents for codebase work, give them the annex and the development-branch docs as context. That is more reliable than letting them guess at front-end internals.
Where it does not fit
This is a front end with supporting tools, not a complete toolchain. The runtime library is described as minimal and explicitly excludes 'real' libraries such as stream I/O. If you want to compile and run a normal C++ program end to end, the repository alone will not give you a standard library. The C-generating back end also produces C, not machine code, so you still need a C compiler to finish the job.
The front end's strengths, compatibility and configurability, mainly pay off for people building products on it. If you just need to compile your own code, you already have a compiler that your code compiles with. That is exactly the compatibility target EDG is trying to match.
Finally, check the licence file and contribution terms in the repository yourself before you ship anything derived from it. Those terms decide whether 'open source' covers your commercial use case.
- #C++ compiler
- #C++ parsing
- #Open Source
- #edgcpp
- #source-to-source transformation
- #static analysis tooling



Comments