GNU Compiler Collection#GENERIC and GIMPLE
{{Short description|Free and open-source compiler for various programming languages}}
{{Primary sources|date=January 2022}}
{{Use mdy dates|date=March 2015}}
{{Infobox software
| name = GNU Compiler Collection
| logo = 100px
| logo caption =
| screenshot = GCC 10.2 GNU Compiler Collection self-compilation.png
| caption = Screenshot of GCC 10.2 compiling its own source code
| collapsible =
| author = Richard Stallman
| developer = GNU Project
| released = {{Start date and age|1987|03|22}}{{cite web|url=https://gnu.org/software/gcc/releases.html|title=GCC Releases|publisher=GNU Project|access-date=July 24, 2020|archive-date=June 4, 2023|archive-url=https://web.archive.org/web/20230604113400/https://www.gnu.org/software/gcc/releases.html|url-status=live}}
| discontinued =
| latest release version = {{wikidata|property|preferred|references|edit|Q178940|P348|P548=Q2804309}}
| latest release date = {{wikidata|qualifier|preferred|single|Q178940|P348|P548=Q2804309|P577}}
| latest preview version = {{wikidata|property|preferred|references|edit|Q178940|P348|P548=Q51930650}}
| latest preview date = {{wikidata|qualifier|preferred|single|Q178940|P348|P548=Q51930650|P577}}
| programming language = C, C++{{Cite web|title=GCC Coding Conventions - GNU Project|url=https://gcc.gnu.org/codingconventions.html|access-date=2022-02-07|website=gcc.gnu.org|archive-date=May 28, 2023|archive-url=https://web.archive.org/web/20230528012107/https://gcc.gnu.org/codingconventions.html|url-status=live}}
| operating system = Cross-platform
| platform = GNU and many others
| size = ~15 million LOC{{cite web|url=https://www.youtube.com/watch?v=QXwxBM4sbYM| archive-url=https://ghostarchive.org/varchive/youtube/20211107/QXwxBM4sbYM| archive-date=2021-11-07 | url-status=live|title=Cutting Edge Toolchain (Latest Features in GCC/GLIBC)|author=Víctor Rodríguez|date=2019-10-01|website=youtube.com|publisher=Linux Foundation|access-date=2021-01-19}}{{cbignore}}
| language = English
| genre = Compiler
| license = GPLv3+ with GCC Runtime Library Exception{{cite web|url=https://gnu.org/licenses/gcc-exception-3.1|title=GCC Runtime Library Exception|access-date=July 24, 2020|archive-date=March 31, 2023|archive-url=https://web.archive.org/web/20230331220440/https://www.gnu.org/licenses/gcc-exception-3.1|url-status=live}}
| alexa =
| website = {{URL|https://gcc.gnu.org}}
}}
The GNU Compiler Collection (GCC) is a collection of compilers from the GNU Project that support various programming languages, hardware architectures, and operating systems. The Free Software Foundation (FSF) distributes GCC as free software under the GNU General Public License (GNU GPL). GCC is a key component of the GNU toolchain which is used for most projects related to GNU and the Linux kernel. With roughly 15 million lines of code in 2019, GCC is one of the largest free programs in existence. It has played an important role in the growth of free software, as both a tool and an example.
When it was first released in 1987 by Richard Stallman, GCC 1.0 was named the GNU C Compiler since it only handled the C programming language. It was extended to compile C++ in December of that year. Front ends were later developed for Objective-C, Objective-C++, Fortran, Ada, Go, D, Modula-2, Rust and COBOL among others.{{cite web|url=https://gcc.gnu.org/frontends.html|title=Programming Languages Supported by GCC|access-date=2014-06-23|publisher=GNU Project|archive-date=January 18, 2023|archive-url=https://web.archive.org/web/20230118185814/https://gcc.gnu.org/frontends.html|url-status=live}} The OpenMP and OpenACC specifications are also supported in the C and C++ compilers.{{Cite web|url=https://gcc.gnu.org/gcc-6/changes.html|title=GCC 6 Release Series — Changes, New Features, and Fixes - GNU Project|website=gcc.gnu.org|access-date=September 19, 2016|archive-date=September 22, 2016|archive-url=https://web.archive.org/web/20160922161533/http://gcc.gnu.org/gcc-6/changes.html|url-status=live}}{{Cite web|url=https://gcc.gnu.org/wiki/OpenACC|title=OpenACC - GCC Wiki|website=gcc.gnu.org|access-date=September 19, 2016|archive-date=April 1, 2015|archive-url=https://web.archive.org/web/20150401174332/https://gcc.gnu.org/wiki/OpenACC|url-status=live}}
As well as being the official compiler of the GNU operating system, GCC has been adopted as the standard compiler by many other modern Unix-like computer operating systems, including most Linux distributions. Most BSD family operating systems also switched to GCC shortly after its release, although since then, FreeBSD and Apple macOS have moved to the Clang compiler,{{Cite web|url=https://llvm.org/Users.html|title=The LLVM Compiler Infrastructure Project|website=llvm.org|access-date=September 24, 2021|archive-date=January 18, 2023|archive-url=https://web.archive.org/web/20230118185909/https://llvm.org/Users.html|url-status=live}} largely due to licensing reasons.{{Cite web|title=Apple's GPLv3 purge|url=http://meta.ath0.com/2012/02/05/apples-great-gpl-purge/|access-date=2021-01-12|website=meta.ath0.com|date=February 5, 2012|language=en-us|archive-date=January 18, 2023|archive-url=https://web.archive.org/web/20230118185910/http://meta.ath0.com/2012/02/05/apples-great-gpl-purge/|url-status=live}}{{Cite web|last=Linnemann|first=Reid|date=June 20, 2012|title=Why Clang|url=https://lists.freebsd.org/pipermail/freebsd-questions/2012-June/242495.html|access-date=2021-01-12|archive-date=January 18, 2023|archive-url=https://web.archive.org/web/20230118185910/https://lists.freebsd.org/pipermail/freebsd-questions/2012-June/242495.html|url-status=live}}{{Cite web|date=2007-10-11|title=August 29, 2007: FreeBSD Foundation Newsletter, August 29, 2007|url=http://www.freebsdfoundation.org/press/2007Aug-newsletter.shtml#Letter|access-date=2021-01-12|archive-url=https://web.archive.org/web/20071011023649/http://www.freebsdfoundation.org/press/2007Aug-newsletter.shtml#Letter|archive-date=October 11, 2007}} GCC can also compile code for Windows, Android, iOS, Solaris, HP-UX, AIX and DOS.{{Cite web|title=Installing GCC: Binaries - GNU Project - Free Software Foundation (FSF)|url=https://gcc.gnu.org/install/binaries.html|access-date=2021-01-12|website=gcc.gnu.org|archive-date=January 5, 2021|archive-url=https://web.archive.org/web/20210105200706/https://gcc.gnu.org/install/binaries.html|url-status=live}}
GCC has been ported to more platforms and instruction set architectures than any other compiler, and is widely deployed as a tool in the development of both free and proprietary software. GCC is also available for many embedded systems, including ARM-based and Power ISA-based chips.
History
In late 1983, in an effort to bootstrap the GNU operating system, Richard Stallman asked Andrew S. Tanenbaum, the author of the Amsterdam Compiler Kit (also known as the Free University Compiler Kit), for permission to use that software for GNU. When Tanenbaum advised him that the compiler was not free, and that only the university was free, Stallman decided to work on a different compiler.{{cite book |last=von Hagen |first=William |date=2006 |title=The Definitive Guide to GCC |edition=2nd |series=Definitive Guides |publisher=Apress |isbn=978-1-4302-0219-6 |page=XXVII |quote=So he wrote to VUCK's author asking if GNU could use it. Evidently, VUCK's developer was uncooperative, responding that the university was free but that the compiler was not. |url=https://books.google.com/books?id=wQ6r3UTivJgC |access-date=September 25, 2020 |archive-date=April 5, 2024 |archive-url=https://web.archive.org/web/20240405040135/https://books.google.com/books?id=wQ6r3UTivJgC |url-status=live }} His initial plan was to rewrite an existing compiler from Lawrence Livermore National Laboratory from Pastel to C with some help from Len Tower and others.{{cite web | last = Stallman | first = Richard | title = About the GNU Project | publisher = The GNU Project | date = September 20, 2011 | url = https://www.gnu.org/gnu/thegnuproject.html | access-date = October 9, 2011 | archive-date = August 9, 2019 | archive-url = https://web.archive.org/web/20190809050636/http://www.gnu.org/gnu/thegnuproject.html | url-status = live }}{{cite journal | editor-last = Puzo | editor-first = Jerome E. | title = Gnu's Zoo | journal = GNU's Bulletin | volume = 1 | issue = 1 | date = February 1986 | publisher = Free Software Foundation | url = https://www.gnu.org/bulletins/bull1.txt | access-date = 2007-08-11 | archive-date = June 23, 2015 | archive-url = https://web.archive.org/web/20150623180723/http://www.gnu.org/bulletins/bull1.txt | url-status = live }} Stallman wrote a new C front end for the Livermore compiler, but then realized that it required megabytes of stack space, an impossibility on a 68000 Unix system with only 64 KB, and concluded he would have to write a new compiler from scratch. None of the Pastel compiler code ended up in GCC, though Stallman did use the C front end he had written.{{cite book |last=von Hagen |first=William |date=2006 |title=The Definitive Guide to GCC |edition=2nd |series=Definitive Guides |publisher=Apress |isbn=978-1-4302-0219-6 |page=XXVII |url=https://books.google.com/books?id=wQ6r3UTivJgC |access-date=September 25, 2020 |archive-date=April 5, 2024 |archive-url=https://web.archive.org/web/20240405040135/https://books.google.com/books?id=wQ6r3UTivJgC |url-status=live }}
GCC was first released March 22, 1987, available by FTP from MIT.{{cite newsgroup | title = GNU C compiler beta test release | author = Richard M. Stallman (forwarded by Leonard H. Tower Jr.) | date = March 22, 1987 | newsgroup = comp.lang.c | url = https://groups.google.com/group/comp.lang.misc/msg/32eda22392c20f98 | access-date = October 9, 2011 | archive-date = June 2, 2013 | archive-url = https://web.archive.org/web/20130602041632/http://groups.google.com/group/comp.lang.misc/msg/32eda22392c20f98 | url-status = live }} Stallman was listed as the author but cited others for their contributions, including Tower for "parts of the parser, RTL generator, RTL definitions, and of the Vax machine description", Jack Davidson and Christopher W. Fraser for the idea of using RTL as an intermediate language, and Paul Rubin for writing most of the preprocessor.{{citation | last = Stallman | first = Richard M. | title = Using and Porting the GNU Compiler Collection (GCC) | chapter-url = https://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_23.html | publisher = Free Software Foundation, Inc. | date = June 22, 2001 | orig-year = First published 1988 | chapter = Contributors to GNU CC | page = 7 | access-date = June 18, 2015 | postscript = . | archive-date = January 18, 2023 | archive-url = https://web.archive.org/web/20230118185814/https://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_23.html | url-status = live }} Described as the "first free software hit" by Peter H. Salus, the GNU compiler arrived just at the time when Sun Microsystems was unbundling its development tools from its operating system, selling them separately at a higher combined price than the previous bundle, which led many of Sun's users to buy or download GCC instead of the vendor's tools.{{cite book |first=Peter H. |last=Salus |author-link=Peter H. Salus |title=The Daemon, the Gnu and the Penguin |chapter=Chapter 10. SUN and gcc |chapter-url=http://www.groklaw.net/article.php?story=20050525231654621 |publisher=Groklaw |year=2005 |access-date=September 14, 2015 |archive-date=June 20, 2022 |archive-url=https://web.archive.org/web/20220620020435/http://www.groklaw.net/article.php?story=20050525231654621 |url-status=live }} While Stallman considered GNU Emacs as his main project, by 1990 GCC supported thirteen computer architectures, was outperforming several vendor compilers, and was used commercially by several companies.{{cite news|last=Garfinkel|first=Simson L.|author-link=Simson Garfinkel|date=6 August 1990|title=Get ready for GNU software|page=102|newspaper=Computerworld|url=https://books.google.com/books?id=mZ0kj6qvsvYC&pg=PT101|access-date=}}
= EGCS fork{{Anchor|EGCS Fork}} =
As GCC was licensed under the GPL, programmers wanting to work in other directions—particularly those writing interfaces for languages other than C—were free to develop their own fork of the compiler, provided they meet the GPL's terms, including its requirements to distribute source code. Multiple forks proved inefficient and unwieldy, however, and the difficulty in getting work accepted by the official GCC project was greatly frustrating for many, as the project favored stability over new features.{{citation | last = Henkel-Wallace | first = David | title = A new compiler project to merge the existing GCC forks | url = https://gcc.gnu.org/news/announcement.html | date = August 15, 1997 | access-date = May 25, 2012 | postscript = . | archive-date = January 18, 2023 | archive-url = https://web.archive.org/web/20230118185814/https://gcc.gnu.org/news/announcement.html | url-status = live }} The FSF kept such close control on what was added to the official version of GCC 2.x (developed since 1992) that GCC was used as one example of the "cathedral" development model in Eric S. Raymond's essay The Cathedral and the Bazaar.
In 1997, a group of developers formed the Experimental/Enhanced GNU Compiler System{{Citation needed|date=April 2025}} (EGCS) to merge several experimental forks into a single project. The basis of the merger was a development snapshot of GCC (taken around the 2.7.2 and later followed up to 2.8.1 release). Mergers included g77 (Fortran), PGCC (P5 Pentium-optimized GCC), many C++ improvements, and many new architectures and operating system variants.{{Cite web|title=The Short History of GCC development|url=http://www.softpanorama.org/People/Stallman/history_of_gcc_development.shtml|access-date=2021-01-24|website=www.softpanorama.org|archive-date=November 9, 2022|archive-url=https://web.archive.org/web/20221109211504/https://softpanorama.org/People/Stallman/history_of_gcc_development.shtml|url-status=live}}
While both projects followed each other's changes closely, EGCS development proved considerably more vigorous, so much so that the FSF officially halted development on their GCC 2.x compiler, blessed EGCS as the official version of GCC, and appointed the EGCS project as the GCC maintainers in April 1999. With the release of GCC 2.95 in July 1999 the two projects were once again united.{{Cite web|title=History - GCC Wiki|url=https://gcc.gnu.org/wiki/History#Reunification|access-date=2020-09-28|website=gcc.gnu.org|archive-date=January 18, 2023|archive-url=https://web.archive.org/web/20230118185814/https://gcc.gnu.org/wiki/History#Reunification|url-status=live}} GCC has since been maintained by a varied group of programmers from around the world under the direction of a steering committee.{{Cite web|url=https://gcc.gnu.org/steering.html|title=GCC steering committee - GNU Project|website=gcc.gnu.org|access-date=July 25, 2016|archive-date=January 18, 2023|archive-url=https://web.archive.org/web/20230118185814/https://gcc.gnu.org/steering.html|url-status=live}}
GCC 3 (2002) removed a front-end for CHILL due to a lack of maintenance.{{cite web|title=PATCH] Remove chill|url=https://gcc.gnu.org/ml/gcc-patches/2002-04/msg00887.html|access-date=July 29, 2010|website=gcc.gnu.org|archive-date=October 20, 2016|archive-url=https://web.archive.org/web/20161020222510/https://gcc.gnu.org/ml/gcc-patches/2002-04/msg00887.html|url-status=live}}
Before version 4.0 the Fortran front end was g77
, which only supported FORTRAN 77, but later was dropped in favor of the new GNU Fortran front end that supports Fortran 95 and large parts of Fortran 2003 and Fortran 2008 as well.{{cite web|title=Chart of Fortran 2003 Features supported by GNU Fortran|url=https://gcc.gnu.org/wiki/Fortran2003Status|access-date=2009-06-25|publisher=GNU|archive-date=January 18, 2023|archive-url=https://web.archive.org/web/20230118185814/https://gcc.gnu.org/wiki/Fortran2003Status|url-status=live}}{{cite web|title=Chart of Fortran 2008 Features supported by GNU Fortran|url=https://gcc.gnu.org/wiki/Fortran2008Status|access-date=2009-06-25|publisher=GNU|archive-date=January 18, 2023|archive-url=https://web.archive.org/web/20230118185814/https://gcc.gnu.org/wiki/Fortran2008Status|url-status=live}}
As of version 4.8, GCC is implemented in C++.{{Cite web|url=https://gcc.gnu.org/gcc-4.8/changes.html|title=GCC 4.8 Release Series — Changes, New Features, and Fixes - GNU Project|website=gcc.gnu.org|access-date=February 17, 2015|archive-date=December 8, 2015|archive-url=https://web.archive.org/web/20151208064435/https://gcc.gnu.org/gcc-4.8/changes.html|url-status=live}}
Support for Cilk Plus existed from GCC 5 to GCC 7.{{Cite web|url=https://gcc.gnu.org/gcc-5/changes.html#c-family|title=GCC 5 Release Series — Changes, New Features, and Fixes|website=gcc.gnu.org|access-date=January 13, 2022|archive-date=January 18, 2023|archive-url=https://web.archive.org/web/20230118185814/https://gcc.gnu.org/gcc-5/changes.html#c-family|url-status=live}}{{Cite web|url=https://gcc.gnu.org/gcc-8/changes.html|title=GCC 8 Release Series — Changes, New Features, and Fixes|website=gcc.gnu.org|access-date=January 13, 2022|archive-date=November 29, 2018|archive-url=https://web.archive.org/web/20181129002653/http://gcc.gnu.org/gcc-8/changes.html|url-status=live}}
GCC has been ported to a wide variety of instruction set architectures, and is widely deployed as a tool in the development of both free and proprietary software. GCC is also available for many embedded systems, including Symbian (called gcce),{{cite web|url=http://www.inf.u-szeged.hu/symbian-gcc/|title=Symbian GCC Improvement Project|access-date=2007-11-08|archive-date=August 1, 2014|archive-url=https://web.archive.org/web/20140801121616/http://www.inf.u-szeged.hu/symbian-gcc/|url-status=live}} ARM-based, and Power ISA-based chips.{{cite web|last=|first=|date=|title=Linux Board Support Packages|url=http://www.freescale.com/webapp/sps/site/overview.jsp?code=CW_BSP&fsrch=1|url-status=dead|archive-url=https://web.archive.org/web/20110607140609/http://www.freescale.com/webapp/sps/site/overview.jsp?code=CW_BSP&fsrch=1|archive-date=2011-06-07|access-date=2021-01-24|website=}} The compiler can target a wide variety of platforms, including video game consoles such as the PlayStation 2,{{cite web|url=http://ps2stuff.playstation2-linux.com/gcc_build.html |title=setting up gcc as a cross-compiler |work=ps2stuff |date=2002-06-08 |access-date=2008-12-12 |url-status=dead |archive-url=https://web.archive.org/web/20081211044658/http://ps2stuff.playstation2-linux.com/gcc_build.html |archive-date=December 11, 2008 }} Cell SPE of PlayStation 3,{{Cite web|url=https://gcc.gnu.org/wiki/CompileFarm|title=CompileFarm - GCC Wiki|website=gcc.gnu.org|access-date=September 19, 2016|archive-date=January 18, 2023|archive-url=https://web.archive.org/web/20230118185814/https://gcc.gnu.org/wiki/CompileFarm|url-status=live}} and Dreamcast.{{cite web |url=http://www.ngine.de/gccguide.html |title=sh4 g++ guide |archive-url=https://web.archive.org/web/20021220025554/http://www.ngine.de/gccguide.html |archive-date=2002-12-20 |access-date=2008-12-12 }} It has been ported to more kinds of processors and operating systems than any other compiler.{{cite web|last=|first=|date=|title=Linux Information Project|url=http://www.linfo.org/gcc.html|access-date=2010-04-27|website=|publisher=LINFO|quote=The GCC has been ported to (i.e., modified to run on) more than 60 platforms, which is more than for any other compiler.|archive-date=January 3, 2023|archive-url=https://web.archive.org/web/20230103063841/http://www.linfo.org/gcc.html|url-status=live}}{{Self-published inline|date=January 2021}}{{Better source needed|date=January 2021}}
Supported languages
{{As of|alt=As of the 15.1 release| 2023|04|post=,}} GCC includes front ends for C (gcc
), C++ (g++
), Objective-C, Objective-C++, Fortran (gfortran
), Ada (GNAT), Go (gccgo
), D (gdc
, since 9.1),{{cite web | url=https://gcc.gnu.org/gcc-9/changes.html#d | title=GCC 9 Release Series — Changes, New Features, and Fixes - GNU Project | access-date=May 7, 2019 | archive-date=February 19, 2022 | archive-url=https://web.archive.org/web/20220219120525/https://gcc.gnu.org/gcc-9/changes.html#d | url-status=live }}{{Cite web|title=The D Language Front-End Finally Merged Into GCC 9 - Phoronix|url=https://phoronix.com/scan.php?page=news_item&px=GCC-9-Merges-D-Language|access-date=2021-01-19|website=phoronix.com|archive-date=May 17, 2022|archive-url=https://web.archive.org/web/20220517184343/https://www.phoronix.com/scan.php?page=news_item&px=GCC-9-Merges-D-Language|url-status=live}} Modula-2 (gm2
, since 13.1),{{cite web | url=https://gcc.gnu.org/gcc-13/changes.html#modula2 | title=GCC 13 Release Series — Changes, New Features, and Fixes - GNU Project | access-date=June 23, 2023 | archive-date=May 26, 2023 | archive-url=https://web.archive.org/web/20230526084642/http://gcc.gnu.org/gcc-13/changes.html#modula2 | url-status=live }}{{Cite web |url=https://www.theregister.com/2022/12/16/gcc_13_will_support_modula2/ |title=GCC 13 to support Modula-2: Follow-up to Pascal lives on in FOSS form |date=2022-12-16 |access-date=2022-12-19 |last=Proven |first=Liam |archive-date=December 19, 2022 |archive-url=https://web.archive.org/web/20221219080641/https://www.theregister.com/2022/12/16/gcc_13_will_support_modula2/ |url-status=live }} Rust (gccrs
, since 15.1) and COBOL (gcobol
, since 15.1) programming languages,{{cite web|url=https://gcc.gnu.org/frontends.html|title=GCC Front Ends|publisher=gnu.org|access-date=November 25, 2011|archive-date=January 18, 2023|archive-url=https://web.archive.org/web/20230118185814/https://gcc.gnu.org/frontends.html|url-status=live}} with the OpenMP and OpenACC parallel language extensions being supported since GCC 5.1.{{Cite web|url=https://gcc.gnu.org/gcc-5/changes.html|title=GCC 5 Release Series — Changes, New Features, and Fixes - GNU Project|website=gcc.gnu.org|access-date=April 23, 2015|archive-date=January 18, 2023|archive-url=https://web.archive.org/web/20230118185814/https://gcc.gnu.org/gcc-5/changes.html|url-status=live}} Versions prior to GCC 7 also supported Java (gcj
), allowing compilation of Java to native machine code.{{cite web|title=GCC 7 Release Series|url=https://gcc.gnu.org/gcc-7/changes.html#java|access-date=March 20, 2018|publisher=gnu.org|archive-date=September 2, 2020|archive-url=https://web.archive.org/web/20200902223230/https://gcc.gnu.org/gcc-7/changes.html#java|url-status=live}}
Third-party front ends exist for many languages, such as ALGOL 68,{{cite web |last1=E. Marchesi |first1=Jose |title= GCC Wiki: Algol 68 Front-End |url=https://gcc.gnu.org/wiki/Algol68FrontEnd |website=gcc.gnu.org}} Pascal (gpc
), Mercury, Modula-3, VHDL (GHDL
) and PL/I. A few experimental branches exist to support additional languages, such as the GCC UPC compiler for Unified Parallel C.{{cite web|url=http://www.gccupc.org/|title=GCC UPC (GCC Unified Parallel C)|publisher=Intrepid Technology, Inc.|date=2006-02-20|access-date=2009-03-11|archive-date=February 11, 2010|archive-url=https://web.archive.org/web/20100211142352/http://www.gccupc.org/|url-status=dead}}{{Cite web|last=Spengler|first=Brad|date=12 January 2021|title=Open Source Security, Inc. Announces Funding of GCC Front-End for Rust|url=https://opensrcsec.com/open_source_security_announces_rust_gcc_funding|access-date=|website=|archive-date=April 25, 2021|archive-url=https://web.archive.org/web/20210425170408/https://opensrcsec.com/open_source_security_announces_rust_gcc_funding|url-status=live}}{{Better source needed|date=January 2021}}
Regarding language version support for C++ and C, since GCC 11.1 the default target is gnu++17, a superset of C++17, and gnu11, a superset of C11, with strict standard support also available. GCC also provides experimental support for C++20 and C++23.{{Cite web|title=C++ Standards Support in GCC|url=https://gcc.gnu.org/projects/cxx-status.html|access-date=May 17, 2021|archive-date=April 20, 2022|archive-url=https://web.archive.org/web/20220420114133/https://gcc.gnu.org/projects/cxx-status.html|url-status=live}}
Design
File:GCC Translation Diagram.jpg, assembler and linker.]]
File:Compiler design.svgs. All program trees are converted to a common abstract representation at the "middle end", allowing code optimization and binary code generation facilities to be shared by all languages.]]
GCC's external interface follows Unix conventions. Users invoke a language-specific driver program (gcc
for C, g++
for C++, etc.), which interprets command arguments, calls the actual compiler, runs the assembler on the output, and then optionally runs the linker to produce a complete executable binary.
Each of the language compilers is a separate program that reads source code and outputs machine code. All have a common internal structure. A per-language front end parses the source code in that language and produces an abstract syntax tree ("tree" for short).
These are, if necessary, converted to the middle end's input representation, called GENERIC form; the middle end then gradually transforms the program towards its final form. Compiler optimizations and static code analysis techniques (such as FORTIFY_SOURCE,{{cite web |url=http://fedoraproject.org/wiki/Security/Features |title=Security Features: Compile Time Buffer Checks (FORTIFY_SOURCE) |publisher=fedoraproject.org |access-date=2009-03-11 |archive-date=January 7, 2007 |archive-url=https://web.archive.org/web/20070107153447/http://fedoraproject.org/wiki/Security/Features |url-status=live }} a compiler directive that attempts to discover some buffer overflows) are applied to the code. These work on multiple representations, mostly the architecture-independent GIMPLE representation and the architecture-dependent RTL representation. Finally, machine code is produced using architecture-specific pattern matching originally based on an algorithm of Jack Davidson and Chris Fraser.
GCC was written primarily in C except for parts of the Ada front end. The distribution includes the standard libraries for Ada and C++ whose code is mostly written in those languages.{{cite web |title=languages used to make GCC |url=http://www.ohloh.net/projects/gcc/analyses/latest |url-status=dead |archive-url=https://web.archive.org/web/20080527213819/http://www.ohloh.net/projects/gcc/analyses/latest |archive-date=May 27, 2008 |access-date=14 September 2008}}{{Update inline|date=January 2023|reason=The first time the reference was used is 2008. It seems it hasn't been updated for a long time. (A reference to the Java compiler was removed in 2021, but the rest of the paragraph hasn't been changed at least since 2013.)}} On some platforms, the distribution also includes a low-level runtime library, libgcc, written in a combination of machine-independent C and processor-specific machine code, designed primarily to handle arithmetic operations that the target processor cannot perform directly.{{cite web|url=https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html|title=GCC Internals|publisher=GCC.org|access-date=March 1, 2010|archive-date=January 18, 2023|archive-url=https://web.archive.org/web/20230118185814/https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html|url-status=live}}
GCC uses many additional tools in its build, many of which are installed by default by many Unix and Linux distributions (but which, normally, aren't present in Windows installations), including Perl,{{Explain|reason=|date=January 2021}} Flex, Bison, and other common tools. In addition, it currently requires three additional libraries to be present in order to build: GMP, MPC, and MPFR.{{Cite web|title=Prerequisites for GCC - GNU Project|url=https://gcc.gnu.org/install/prerequisites.html|access-date=2021-09-05|website=gcc.gnu.org|archive-date=January 18, 2023|archive-url=https://web.archive.org/web/20230118185814/https://gcc.gnu.org/install/prerequisites.html|url-status=live}}
In May 2010, the GCC steering committee decided to allow use of a C++ compiler to compile GCC.{{cite news | title = GCC allows C++ – to some degree | url = http://www.h-online.com/open/news/item/GCC-allows-C-to-some-degree-1012611.html | publisher = The H | date = June 1, 2010 | access-date = June 9, 2010 | archive-date = September 26, 2022 | archive-url = https://web.archive.org/web/20220926160308/http://www.h-online.com/open/news/item/GCC-allows-C-to-some-degree-1012611.html | url-status = live }} The compiler was intended to be written mostly in C plus a subset of features from C++. In particular, this was decided so that GCC's developers could use the destructors and generics features of C++.{{Cite web|url=https://lists.gnu.org/archive/html/emacs-devel/2010-07/msg00518.html|title=Re: Efforts to attract more users?|website=lists.gnu.org|access-date=September 24, 2021|archive-date=January 18, 2023|archive-url=https://web.archive.org/web/20230118185909/https://lists.gnu.org/archive/html/emacs-devel/2010-07/msg00518.html|url-status=live}}
In August 2012, the GCC steering committee announced that GCC now uses C++ as its implementation language.{{cite web|title=GCC 4.8 Release Series: Changes, New Features, and Fixes|url=https://gcc.gnu.org/gcc-4.8/changes.html|access-date=October 4, 2013|archive-date=December 8, 2015|archive-url=https://web.archive.org/web/20151208064435/https://gcc.gnu.org/gcc-4.8/changes.html|url-status=live}} This means that to build GCC from sources, a C++ compiler is required that understands ISO/IEC C++03 standard.
On May 18, 2020, GCC moved away from ISO/IEC C++03 standard to ISO/IEC C++11 standard (i.e. needed to compile, bootstrap, the compiler itself; by default it however compiles later versions of C++).{{cite web|title=bootstrap: Update requirement to C++11.|website=GitHub|url=https://github.com/gcc-mirror/gcc/commit/5329b59a2e13dabbe2038af0fe2e3cf5fc7f98ed|access-date=May 18, 2020|archive-date=September 29, 2022|archive-url=https://web.archive.org/web/20220929120518/https://github.com/gcc-mirror/gcc/commit/5329b59a2e13dabbe2038af0fe2e3cf5fc7f98ed|url-status=live}}
= Front ends =
File:Xxx Scanner and parser example for C.gif, lexical analysis, syntactic analysis (parsing) and semantic analysis. The goals of compiler front ends are to either accept or reject candidate programs according to the language grammar and semantics, identify errors and handle valid program representations to later compiler stages. This example shows the lexer and parser steps performed for a simple program written in C.]]
Each front end uses a parser to produce the abstract syntax tree of a given source file. Due to the syntax tree abstraction, source files of any of the different supported languages can be processed by the same back end. GCC started out using LALR parsers generated with Bison, but gradually switched to hand-written recursive-descent parsers for C++ in 2004,{{Cite web|url=https://gcc.gnu.org/gcc-3.4/changes.html|title=GCC 3.4 Release Series — Changes, New Features, and Fixes - GNU Project|website=gcc.gnu.org|access-date=July 25, 2016|archive-date=January 18, 2023|archive-url=https://web.archive.org/web/20230118185814/https://gcc.gnu.org/gcc-3.4/changes.html|url-status=live}} and for C and Objective-C in 2006.{{Cite web|url=https://gcc.gnu.org/gcc-4.1/changes.html|title=GCC 4.1 Release Series — Changes, New Features, and Fixes - GNU Project|website=gcc.gnu.org|access-date=July 25, 2016|archive-date=January 18, 2023|archive-url=https://web.archive.org/web/20230118185814/https://gcc.gnu.org/gcc-4.1/changes.html|url-status=live}} As of 2021 all front ends use hand-written recursive-descent parsers.
Until GCC 4.0, the tree representation of the program was not fully independent of the processor being targeted. The meaning of a tree was somewhat different for different language front ends, and front ends could provide their own tree codes. This was simplified with the introduction of GENERIC and GIMPLE, two new forms of language-independent trees that were introduced with the advent of GCC 4.0. GENERIC is more complex, based on the GCC 3.x Java front end's intermediate representation. GIMPLE is a simplified GENERIC, in which various constructs are lowered to multiple GIMPLE instructions. The C, C++, and Java front ends produce GENERIC directly in the front end. Other front ends instead have different intermediate representations after parsing and convert these to GENERIC.
In either case, the so-called "gimplifier" then converts this more complex form into the simpler SSA-based GIMPLE form that is the common language for a large number of language- and architecture-independent global (function scope) optimizations.
= GENERIC and GIMPLE =
GENERIC is an intermediate representation language used as a "middle end" while compiling source code into executable binaries. A subset, called GIMPLE, is targeted by all the front ends of GCC.
The middle stage of GCC does all of the code analysis and optimization, working independently of both the compiled language and the target architecture, starting from the GENERIC{{Cite web|url=https://gcc.gnu.org/onlinedocs/gccint/GENERIC.html|title=GENERIC (GNU Compiler Collection (GCC) Internals)|website=gcc.gnu.org|access-date=July 25, 2016|archive-date=January 18, 2023|archive-url=https://web.archive.org/web/20230118185814/https://gcc.gnu.org/onlinedocs/gccint/GENERIC.html|url-status=live}} representation and expanding it to register transfer language (RTL). The GENERIC representation contains only the subset of the imperative programming constructs optimized by the middle end.
In transforming the source code to GIMPLE,{{Cite web|url=https://gcc.gnu.org/onlinedocs/gccint/GIMPLE.html|title=GIMPLE (GNU Compiler Collection (GCC) Internals)|website=gcc.gnu.org|access-date=July 25, 2016|archive-date=January 18, 2023|archive-url=https://web.archive.org/web/20230118185814/https://gcc.gnu.org/onlinedocs/gccint/GIMPLE.html|url-status=live}} complex expressions are split into a three-address code using temporary variables. This representation was inspired by the SIMPLE representation proposed in the McCAT compiler{{cite web |url=http://www-acaps.cs.mcgill.ca/info/McCAT/McCAT.html |title=McCAT |access-date=2017-09-14 |url-status=bot: unknown |archive-url=https://web.archive.org/web/20040812030043/http://www-acaps.cs.mcgill.ca/info/McCAT/McCAT.html |archive-date=August 12, 2004 |df=mdy-all }} by Laurie J. Hendren{{Cite web|url=http://www.sable.mcgill.ca/~hendren/|title=Laurie Hendren's Home Page|website=www.sable.mcgill.ca|access-date=July 20, 2009|archive-date=September 27, 2022|archive-url=https://web.archive.org/web/20220927074148/http://www.sable.mcgill.ca/~hendren/|url-status=live}} for simplifying the analysis and optimization of imperative programs.
= Optimization =
Optimization can occur during any phase of compilation; however, the bulk of optimizations are performed after the syntax and semantic analysis of the front end and before the code generation of the back end; thus a common, though somewhat self-contradictory, name for this part of the compiler is the "middle end."
The exact set of GCC optimizations varies from release to release as it develops, but includes the standard algorithms, such as loop optimization, jump threading, common subexpression elimination, instruction scheduling, and so forth. The RTL optimizations are of less importance with the addition of global SSA-based optimizations on GIMPLE trees,{{cite web|url=http://www.redhat.com/magazine/002dec04/features/gcc/|title=From Source to Binary: The Inner Workings of GCC|last=Novillo|first=Diego|work=Red Hat Magazine|date=December 2004|url-status=dead|archive-url=https://web.archive.org/web/20090401215553/http://www.redhat.com/magazine/002dec04/features/gcc/|archive-date=April 1, 2009|df=mdy-all}} as RTL optimizations have a much more limited scope, and have less high-level information.
Some of these optimizations performed at this level include dead-code elimination, partial-redundancy elimination, global value numbering, sparse conditional constant propagation, and scalar replacement of aggregates. Array dependence based optimizations such as automatic vectorization and automatic parallelization are also performed. Profile-guided optimization is also possible.{{Cite web|url=https://gcc.gnu.org/install/build.html#TOC4|title=Installing GCC: Building - GNU Project|website=gcc.gnu.org|access-date=July 25, 2016|archive-date=August 22, 2023|archive-url=https://web.archive.org/web/20230822141635/http://gcc.gnu.org/install/build.html#TOC4|url-status=live}}
= C++ Standard Library (libstdc++) =
The GCC project includes an implementation of the C++ Standard Library called libstdc++,{{cite web|url=https://gcc.gnu.org/onlinedocs/libstdc++|title=The GNU C++ Library|publisher=GNU Project|accessdate=2021-02-21|archive-date=December 25, 2022|archive-url=https://web.archive.org/web/20221225041607/https://gcc.gnu.org/onlinedocs/libstdc++/|url-status=live}} licensed under the GPLv3 License with an exception to link non-GPL applications when sources are built with GCC.{{cite web|url=https://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html|title=License|publisher=GNU Project|accessdate=2021-02-21|archive-date=January 18, 2023|archive-url=https://web.archive.org/web/20230118185814/https://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html|url-status=live}}
= Other features =
Some features of GCC include:
; Link-time optimization
: Link-time optimization optimizes across object file boundaries to directly improve the linked binary. Link-time optimization relies on an intermediate file containing the serialization of some Gimple representation included in the object file.{{Citation needed|date=January 2016}} The file is generated alongside the object file during source compilation. Each source compilation generates a separate object file and link-time helper file. When the object files are linked, the compiler is executed again and uses the helper files to optimize code across the separately compiled object files.
; Plugins
: Plugins extend the GCC compiler directly.{{cite web |title= Plugins |url= https://gcc.gnu.org/onlinedocs/gccint/Plugins.html |work= GCC online documentation |access-date= July 8, 2013 |archive-date= April 30, 2013 |archive-url= https://web.archive.org/web/20130430223330/http://gcc.gnu.org/onlinedocs/gccint/Plugins.html |url-status= live }} Plugins allow a stock compiler to be tailored to specific needs by external code loaded as plugins. For example, plugins can add, replace, or even remove middle-end passes operating on Gimple representations.{{cite web|last=Starynkevitch|first=Basile|title=GCC plugins thru the MELT example|url=http://gcc-melt.org/gcc-plugin-MELT-LinuxCollabSummit2014.pdf |archive-url=https://web.archive.org/web/20140413124801/http://gcc-melt.org/gcc-plugin-MELT-LinuxCollabSummit2014.pdf |archive-date=2014-04-13 |url-status=live|access-date=2014-04-10}} Several GCC plugins have already been published, notably:
:* The Python plugin, which links against libpython, and allows one to invoke arbitrary Python scripts from inside the compiler. The aim is to allow GCC plugins to be written in Python.
:* The MELT plugin provides a high-level Lisp-like language to extend GCC.{{cite web|title=About GCC MELT|url=http://gcc-melt.org/|access-date=July 8, 2013|archive-url= https://archive.today/20130704015544/http://gcc-melt.org/|archive-date=July 4, 2013|url-status=live}}
: The support of plugins was once a contentious issue in 2007.{{cite web |title=GCC unplugged [LWN.net] |url=https://lwn.net/Articles/259157/ |website=lwn.net |access-date=March 28, 2021 |archive-date=November 9, 2020 |archive-url=https://web.archive.org/web/20201109001410/https://lwn.net/Articles/259157/ |url-status=live }}
; C++ transactional memory
: The C++ language has an active proposal for transactional memory. It can be enabled in GCC 6 and newer when compiling with -fgnu-tm
.{{Cite web|url=https://gcc.gnu.org/wiki/TransactionalMemory|title=TransactionalMemory - GCC Wiki|website=gcc.gnu.org|access-date=September 19, 2016|archive-date=August 19, 2016|archive-url=https://web.archive.org/web/20160819055121/http://gcc.gnu.org/wiki/TransactionalMemory|url-status=live}}
; Unicode identifiers
: Although the C++ language requires support for non-ASCII Unicode characters in identifiers, the feature has only been supported since GCC 10. As with the existing handling of string literals, the source file is assumed to be encoded in UTF-8. The feature is optional in C, but has been made available too since this change.{{Cite web|url=https://gcc.gnu.org/legacy-ml/gcc-patches/2020-01/msg01667.html|title=Lewis Hyatt - [PATCH] wwwdocs: Document support for extended identifiers added to GCC|website=gcc.gnu.org|access-date=2020-03-27|archive-date=March 27, 2020|archive-url=https://web.archive.org/web/20200327153559/https://gcc.gnu.org/legacy-ml/gcc-patches/2020-01/msg01667.html|url-status=live}}{{Cite web|url=http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3146.html|title=Recommendations for extended identifier characters for C and C++|website=www.open-std.org|access-date=2020-03-27|archive-date=September 30, 2020|archive-url=https://web.archive.org/web/20200930152408/http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3146.html|url-status=live}}
; C extensions
: GNU C extends the C programming language with several non-standard-features, including nested functions.{{Cite web|title=C Extensions (Using the GNU Compiler Collection (GCC))|url=https://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html|access-date=2022-01-12|website=gcc.gnu.org|archive-date=January 12, 2022|archive-url=https://web.archive.org/web/20220112203037/https://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html|url-status=live}}
Architectures
File:GCC DJGPP Windows.png on Windows]]
The primary supported (and best tested) processor families are 64- and 32-bit ARM, 64- and 32-bit x86 64 and x86 and 64-bit PowerPC and SPARC.{{Cite web |date=2022-10-26 |title=GCC 12 Release Criteria |url=https://gcc.gnu.org/gcc-12/criteria.html |access-date=2023-01-27 |website=gcc.gnu.org |archive-date=January 27, 2023 |archive-url=https://web.archive.org/web/20230127213916/https://gcc.gnu.org/gcc-12/criteria.html |url-status=live }}
GCC target processor families as of version 11.1 include:{{Cite web|title=Option Summary (Using the GNU Compiler Collection (GCC))|url=https://gcc.gnu.org/onlinedocs/gcc-10.2.0/gcc/Option-Summary.html#Option-Summary|access-date=2020-08-21|website=gcc.gnu.org|archive-date=January 18, 2023|archive-url=https://web.archive.org/web/20230118185814/https://gcc.gnu.org/onlinedocs/gcc-10.2.0/gcc/Option-Summary.html#Option-Summary|url-status=live}}
{{div col|colwidth=15em|small=no}}
- AArch64
- Alpha
- ARM
- AVR
- Blackfin
- eBPF
- Epiphany (GCC 4.8)
- H8/300
- HC12
- IA-32 (32-bit x86)
- IA-64 (Intel Itanium)
- MIPS
- Motorola 68000 series
- MSP430
- Nvidia GPU
- Nvidia PTX
- PA-RISC
- PDP-11
- PowerPC
- R8C / M16C / M32C
- RISC-V
- SPARC
- SuperH
- System/390 / z/Architecture
- VAX
- x86-64
{{Refend}}
Lesser-known target processors supported in the standard release have included:
{{div col|colwidth=15em|small=no}}
- 68HC11
- A29K
- C6x
- CR16
- D30V
- DSP16xx
- ETRAX CRIS
- FR-30
- FR-V
- IBM ROMP
- Intel i960
- IP2000
- M32R
- MCORE
- MIL-STD-1750A
- MMIX
- MN10200
- MN10300
- Motorola 88000
- NS32K
- RL78
- Stormy16
- V850
- Xtensa
{{Refend}}
Additional processors have been supported by GCC versions maintained separately from the FSF version:
{{div col|colwidth=15em|small=no}}
- Cortus APS3
- ARC
- AVR32
- C166 and C167
- D10V
- EISC
- eSi-RISC
- Hexagon{{Cite web |url=https://www.codeaurora.org/xwiki/bin/Hexagon/ |title=Hexagon Project Wiki |url-status=dead |access-date=May 19, 2011 |archive-url=https://web.archive.org/web/20120323192748/https://www.codeaurora.org/xwiki/bin/Hexagon/ |archive-date=March 23, 2012}}
- LatticeMico32
- LatticeMico8
- MeP
- MicroBlaze
- Motorola 6809
- MSP430
- NEC SX architecture{{Cite web|url=https://code.google.com/archive/p/sx-gcc|title=Google Code Archive - Long-term storage for Google Code Project Hosting.|website=code.google.com|access-date=September 24, 2021|archive-date=September 25, 2022|archive-url=https://web.archive.org/web/20220925035202/https://code.google.com/archive/p/sx-gcc|url-status=live}}
- Nios II and Nios
- OpenRISC
- PDP-10
- PIC24/dsPIC
- PIC32
- Propeller
- Saturn (HP48XGCC)
- System/370
- TIGCC (m68k variant)
- TMS9900
- TriCore
- Z8000
- ZPU
{{Refend}}
The GCJ Java compiler can target either a native machine language architecture or the Java virtual machine's Java bytecode.{{cite web|url=https://gcc.gnu.org/java/|title=The GNU Compiler for the Java Programming Language|access-date=2010-04-22|url-status=dead|archive-url=https://web.archive.org/web/20070509055923/http://gcc.gnu.org/java/|archive-date=May 9, 2007|df=mdy-all}} When retargeting GCC to a new platform, bootstrapping is often used. Motorola 68000, Zilog Z80, and other processors are also targeted in the GCC versions developed for various Texas Instruments, Hewlett Packard, Sharp, and Casio programmable graphing calculators.graphing calculators#programming
License
GCC is licensed under the GNU General Public License version 3.{{Cite web|url=https://gcc.gnu.org/onlinedocs/gcc/Copying.html#Copying|title=Using the GNU Compiler Collection|website=gnu.org|access-date=2019-11-05|archive-date=November 16, 2023|archive-url=https://web.archive.org/web/20231116021350/https://gcc.gnu.org/onlinedocs/gcc/Copying.html#Copying|url-status=live}} The GCC runtime exception permits compilation of proprietary programs (in addition to free software) with GCC headers and runtime libraries. This does not impact the license terms of GCC source code.{{cite web|publisher=FSF|title=GCC Runtime Exception|url=https://www.gnu.org/licenses/gcc-exception|access-date=2014-04-10|archive-date=April 16, 2014|archive-url=https://web.archive.org/web/20140416192813/https://www.gnu.org/licenses/gcc-exception|url-status=live}}
See also
{{Portal|Free and open-source software|Computer programming}}
References
{{Reflist}}
Further reading
- [https://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/ Using the GNU Compiler Collection (GCC)], Free Software Foundation, 2008.
- [https://gcc.gnu.org/onlinedocs/gccint/ GNU Compiler Collection (GCC) Internals], Free Software Foundation, 2008.
- [https://archive.today/20121205072412/http://www.network-theory.co.uk/gcc/intro/ An Introduction to GCC], Network Theory Ltd., 2004 (Revised August 2005). {{ISBN|0-9541617-9-3}}.
- Arthur Griffith, GCC: The Complete Reference. McGraw Hill / Osborne, 2002. {{ISBN|0-07-222405-3}}.
External links
{{Commons}}
{{Wikibooks|GNU C Compiler Internals}}
= Official =
- {{official website}}
- [https://gcc.gnu.org/releases.html GCC Release Timeline]
- [https://gcc.gnu.org/develop.html#timeline GCC Development Plan]
= Other =
- [http://www.cse.iitb.ac.in/grc/ Collection of GCC 4.0.2 architecture and internals documents] at I.I.T. Bombay
- {{cite news |date=March 2, 2006 |title=New GCC Heavy on Optimization |publisher= internetnews.com |last= Kerner |first=Sean Michael |url = http://www.internetnews.com/dev-news/article.php/3588926 |postscript=none}}
- {{cite news |date=April 22, 2005 |title=Open Source GCC 4.0: Older, Faster |publisher=internetnews.com |last=Kerner |first=Sean Michael |url=http://www.internetnews.com/dev-news/article.php/3499881 |postscript=none |access-date=October 21, 2006 |archive-date=September 17, 2006 |archive-url=https://web.archive.org/web/20060917233745/http://www.internetnews.com/dev-news/article.php/3499881 |url-status=dead }}
- [https://web.archive.org/web/20090401215553/http://www.redhat.com/magazine/002dec04/features/gcc/ From Source to Binary: The Inner Workings of GCC], by Diego Novillo, Red Hat Magazine, December 2004
- [http://gcc.gnu.org/pub/gcc/summit/2003/GENERIC%20and%20GIMPLE.pdf A 2003 paper on GENERIC and GIMPLE]
- [https://web.archive.org/web/20171022105307/http://www.toad.com/gnu/cygnus/index.html Marketing Cygnus Support], an essay covering GCC development for the 1990s, with 30 monthly reports for in the "Inside Cygnus Engineering" section near the end
- [http://oldhome.schmorp.de/egcs.html EGCS 1.0 announcement]
- [https://gcc.gnu.org/egcs-1.0/features.html EGCS 1.0 features list]
- [http://linuxmafia.com/faq/Licensing_and_Law/forking.html Fear of Forking], an essay by Rick Moen recording seven well-known forks, including the GCC/EGCS one
{{GNU}}
{{FOSS}}
{{Authority control}}
Category:C (programming language) compilers
Category:Cross-platform free software
Category:Free and open source compilers
Category:Java development tools
Category:Pascal (programming language) compilers
Category:Software that was rewritten in C++
Category:Free software programmed in C++