GCC
The most recommended of 26 compilers
A free, decades-proven C/C++ compiler that people trust for reliable code, wide target support including embedded, and useful flags, though it sometimes misses obvious optimizations.
A free, decades-proven C/C++ compiler that people trust for reliable code, wide target support including embedded, and useful flags, though it sometimes misses obvious optimizations.
261 people gave an opinion
- recommend it
- 138
- criticize it
- 123
- approval share
- 53%
Recommended in 12 of 13 months
- November 2025: recommended
- December 2025: recommended
- January 2026: recommended
- February 2026: recommended
- March 2026: recommended
- April 2026: recommended
- May 2026: recommended
- June 2026: recommended
- July 2026: recommended
- August 2026: recommended
- September 2026: recommended
- October 2026: recommended
- November 2026: not recommended (month in progress)
Owned for 15 years
Median of the 9 owners who said how long they have had it.
Each square is one year.
Why it doesn’t carry the badge
- 138 people recommend itNeeds 10 or more, met.
- 1.1 recommenders for every criticNeeds 2 to 1 or better, not met.
- Recommended in 12 of 13 monthsNeeds 4 or more, met.
The same three rules apply to every product, and the badge can’t be bought. How the badge works
What people say about it
The reasons people give, with the number of comments that give each one. Open a reason to read what they said.
Why people recommend it
Each mark is one comment
Battle-tested and reliable
“GCC and Clang are worth much much more because they are battle-tested compilers that we understand and know work, even in a multitude of corner cases, over decades.”
Comment from 5 Feb 2026 in “We tasked Opus 4.6 using agent teams to build a C Compiler” “The compiler reliably and deterministically produces code that does exactly what you specified in the source code.”
Comment from 9 Jan 2026 in “AI Zealotry” “I can't remember the last time GCC emitted code that just flat out called the wrong function.”
Comment from 6 Sep 2026 in “Your intellectual fly is open when you use an LLM to author a post (2025)” - Comment from 11 Jan 2026 in “Gentoo Linux 2025 Review”
- Comment from 19 Sep 2026 in “If math is more than proof, we need to better celebrate the rest of it”
- Comment from 15 Dec 2025 in “The Tor Project is switching to Rust”
Useful warnings and diagnostic flags
“Another really helpful tool is writing something in C/C++, and compiling with "gcc -O1 -S file.c" to see the assembly gcc generated”
Comment from 10 May 2026 in “Show HN: Building a web server in assembly to give my life (a lack of) meaning” “You can do that in GCC now (-ftrivial-auto-var-init=zero). There are a few projects that decided to enable this by default.”
Comment from 4 Jan 2026 in “Xr0 verifier, guarantee the safety of C programs at compile time” “GCC -Wall what tells me about most implicit casts going on (which I mostly ignore). But not all of them.”
Comment from 10 Apr 2026 in “Safer Casting in C – With Zero Runtime Cost – Making Casts Visible, Auditable” - Comment from 27 Dec 2025 in “SIMD City: Auto-Vectorisation”
- Comment from 16 Apr 2026 in “Too much discussion of the XOR swap trick”
Supports many targets, including embedded
“their mutually compatible, but completely standards non-conformant extensions that make writing for embedded reasonable”
Comment from 20 Jul 2026 in “Neither GCC nor Clang are compliant with standard C++” “Well it support more targets then LLVM and in most cases it generates similar if not better executable.”
Comment from 30 Apr 2026 in “GCC 16 has been released” “If i cannot use GCC i cannot compile to half the embedded platforms i work with on a daily basis.”
Comment from 2 May 2026 in “Lib0xc: A set of C standard library-adjacent APIs for safer systems programming” Strong code generation
“If there's one thing compilers do well is pattern match on code patterns and replace with more efficient ones”
Comment from 24 Dec 2025 in “When Compilers Surprise You” “llvm/gcc won the compiler world because they blew the codegen of proprietary compilers out of the water”
Comment from 17 Feb 2026 in “Can a Computer Science Student Be Taught to Design Hardware?” “Well it support more targets then LLVM and in most cases it generates similar if not better executable.”
Comment from 30 Apr 2026 in “GCC 16 has been released” - Comment from 22 Sep 2026 in “How did AMD Ryzen get 50% faster in two years?”
What people warn about
Each mark is one comment
Misses obvious optimization opportunities
“GCC and LLVM can find some amazing optimizations, but they also consistently miss very obvious optimization opportunities”
Comment from 4 Dec 2025 in “You can't fool the optimizer” “GCC generates branchless code for 'is_divisible_by_6', which is just worse than 'is_divisible_by_6_optimal' in all cases.”
Comment from 4 Dec 2025 in “You can't fool the optimizer” “GCC has historically been a bit of a pig about -Os, my favorite example is on x86 where it will emit a runtime divide”
Comment from 30 Jul 2026 in “ESP32-C6 Power Consumption: Arduino vs. Zephyr vs. ESP-IDF Comparison” Hard to bootstrap and cross-compile
“Getting all of LLVM mesa linux cmake ninja glibc gcc binutils xorg KDE to work is more work than in 2005 or 2010.”
Comment from 21 Jan 2026 in “Linux from Scratch” “To get a GCC cross-compile for a given set of architecture triples, one needs a complete graph of GCC toolchains”
Comment from 16 Oct 2026 in “Last rites for Gentoo's Chromium package” “bootstrapping older GCC and LLVM versions on modern systems is far from trivial and typically requires patching”
Comment from 17 May 2026 in “Just Fucking Use Go” Difficult to extend with modern techniques
“gcc was and is an incredible achievement, but it is traditionally considered difficult to implement many modern compiler techqniques in it”
Comment from 24 Dec 2025 in “When Compilers Surprise You” “he specifically opposed exporting the AST, which makes a whole bunch of useful programming tools difficult or impossible”
Comment from 16 Dec 2025 in “Rust GCC backend: Why and how”
Other compilers people recommend
The four most recommended other compilers, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.
| Product | Recommend | Criticize | Approval | Months | Owned | Badge |
|---|---|---|---|---|---|---|
| GCCThis page | 138 | 123 | 53% | 12 | 15 yrs9 owners | — |
| Clang | 74 | 50 | 60% | 12 | — | — |
| Free Pascal compiler | 38 | 7 | 84% | 11 | — | Approved |
| GraalVM Native Image | 31 | 9 | 78% | 11 | — | Approved |
| .NET Native AOT | 26 | 13 | 67% | 10 | — | Approved |
What people said
40 of the 359 comments that mention it, newest first. Each links to the original comment.
“To get a GCC cross-compile for a given set of architecture triples, one needs a complete graph of GCC toolchains”
“Does Gentoo also recompile every C/C++ library in the dependency tree every time GCC pushes a minor version bump?”
“I'd crawl over an acre of 'Visual This++' and 'Integrated Development That' to get to gcc, Emacs, and gdb.”
“Some newer GCC, and upcoming new x86-64v3 targets will all have some pretty nice wins too.”
“old and reliable piece of software built on abstractions that have stood the test of time”
“GCC's optimization info can be rather inscrutable because it's in terms of compiler internal nomenclature.”
“I can't remember the last time GCC emitted code that just flat out called the wrong function.”
“GCC has historically been a bit of a pig about -Os, my favorite example is on x86 where it will emit a runtime divide”
“it's hugely encouraging to have the stewards of this project contemplate, and then determine to have this policy”
“their mutually compatible, but completely standards non-conformant extensions that make writing for embedded reasonable”
“it was useful compiling with Visual C++ and gcc to shake out any iffy syntax that worked in one but not the other”
“Anyone who uses -ffast-math or similar options for compiling a program that is not intended for graphics or ML/AI, where errors supposedly do not matter, makes an unforgivable mistake.”
“If you passed the actual '__m128' down the function call chain instead, clang and gcc would then do the right thing.”
“bootstrapping older GCC and LLVM versions on modern systems is far from trivial and typically requires patching”
“Another really helpful tool is writing something in C/C++, and compiling with "gcc -O1 -S file.c" to see the assembly gcc generated”
“If i cannot use GCC i cannot compile to half the embedded platforms i work with on a daily basis.”
“Well it support more targets then LLVM and in most cases it generates similar if not better executable.”
“I ran into some issues with some programs (could not compile them with recent GCC, but older GCC worked fine)”
“If you build any current gcc version, you must just choose the option of having ada among the available languages and all will work smoothly.”
“-Wstrict-overflow=4 is fun: it complains about risky things the gcc optimizer did to my code.”
“GCC -Wall what tells me about most implicit casts going on (which I mostly ignore). But not all of them.”
“They were much more successful in userland (coreutils, gcc and the toolchain, gdb, Emacs, to name a few).”
“llvm/gcc won the compiler world because they blew the codegen of proprietary compilers out of the water”
“GCC and Clang are worth much much more because they are battle-tested compilers that we understand and know work, even in a multitude of corner cases, over decades.”
“Getting all of LLVM mesa linux cmake ninja glibc gcc binutils xorg KDE to work is more work than in 2005 or 2010.”
“its been years since I had a build failure, and I even accept several on ~amd64. (with gcc)”
“sooner or later one will need both `clang` and `gcc`, because they're equivalent only in theory”
“The compiler reliably and deterministically produces code that does exactly what you specified in the source code.”
“GCC takes this hint and uses it in the optimizer, so you cannot have both a compile time and a run time check”
“You can do that in GCC now (-ftrivial-auto-var-init=zero). There are a few projects that decided to enable this by default.”
“GCC's -fopt-... flags can give you a lot of information on vectorization and other optimizations”
“gcc was and is an incredible achievement, but it is traditionally considered difficult to implement many modern compiler techqniques in it”
“If there's one thing compilers do well is pattern match on code patterns and replace with more efficient ones”
“a GPL piece of software that has been a part of the Linux core for almost all of Linux's existence”
“he specifically opposed exporting the AST, which makes a whole bunch of useful programming tools difficult or impossible”
“I have zero problems bootstrapping a recent gcc with all bells and whistles on my setup.”
“in normal C++ there are GCC or Clang (I forget which) extensions for detecting threading issues”
“GCC generates branchless code for 'is_divisible_by_6', which is just worse than 'is_divisible_by_6_optimal' in all cases.”
“GCC and LLVM can find some amazing optimizations, but they also consistently miss very obvious optimization opportunities”
“the GCC, OpenWatcom, and DJGPP compilers the FreeDOS folks recommend are additionally free software, which is of real value to some of us”
Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.