EDG C++ front-end goes public
EDG’s long‑standing commercial C/C++ compiler front-end, used under the hood by many proprietary compilers, IDEs, and static analysis tools, has been open-sourced under the Apache 2.0 license with the LLVM exception. Commenters highlight its reputation for standards conformance, ability to emulate multiple major compiler dialects (GCC, Clang, MSVC), source-to-source transformation capabilities, and remarkably fast builds. At the same time, they note that EDG the company is winding down, raising questions about long‑term maintenance and reinforcing a broader shift toward Clang and GCC as the dominant open-source C++ front-ends.
What EDG C++ Front-End Is
- Longstanding commercial C/C++ compiler frontend used under the hood by many proprietary compilers, IDEs, and static analyzers.
- One of four major C++ frontends alongside GCC, Clang, and MSVC.
- Focuses on parsing, full semantic analysis, and producing an intermediate language (IL); not a full optimizing backend.
- Can act as a C++‑to‑C and C++‑to‑C++ source generator.
Open-Sourcing, License, and Company Status
- Frontend is now public on GitHub with Apache-2.0 + LLVM exception.
- LLVM exception: allows shipping binaries embedding parts of the code without some Apache conditions and permits GPLv2 combination by waiving conflicting patent/indemnity clauses.
- Multiple comments note the company is winding down; open-sourcing is seen partly as a graceful exit and a bridge for remaining customers.
Technical Capabilities and Design
- Can emulate many versions and dialects of GCC, Clang, MSVC, and others, including their quirks and bugs.
- Supports many C++ standards up through (reportedly) near‑C++23 plus some C++26 features; also many dialects (GNU, Microsoft, older cfront, etc.).
- Offers source-to-source transformation backend and tools for IL inspection and a prelinker for template instantiation.
- Written mostly in portable C with custom data structures, no C++ standard library, very fast to compile, and produces small binaries.
Historical Role and Influence on C++
- Used in major commercial compilers (including some embedded and console toolchains).
- Only implementation to fully support the old C++98
exporttemplates, influencing their eventual removal. - Used for prototyping newer C++ features such as static reflection.
Ecosystem Impact and Future Prospects
- Many see the release as “big news” but also as the effective end-of-life of a major frontend, as most vendors have moved or are moving to Clang/GCC.
- Some hope open source may give EDG a “second life”; others are skeptical given C++ frontend complexity and lack of a clear maintainer base.
- Discussion notes declining customer count and the burden of tracking ever-growing C++ standards.
Codebase Characteristics and Style
- Distinct, older C-like style: comments between function signature and brace, unusual naming conventions (e.g.,
a_/an_prefixes). - Seen as a snapshot of compiler engineering history, with very long commit history and some quirky components (e.g., a large hand-built Unicode FSM).