# GCC

138 Hacker News commenters recommended GCC and 123 criticized it, November 2025 to November 2026. It was recommended in 12 of 13 months; owners who said how long report a median of 15 years (9 owners).

**Verdict:** 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.

## Why people recommend it

- Battle-tested and reliable (6 comments): "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." ([source](https://news.ycombinator.com/item?id=46905969)) "The compiler reliably and deterministically produces code that does exactly what you specified in the source code." ([source](https://news.ycombinator.com/item?id=46559708)) "I can't remember the last time GCC emitted code that just flat out called the wrong function." ([source](https://news.ycombinator.com/item?id=49588878))
- Useful warnings and diagnostic flags (5 comments): "Another really helpful tool is writing something in C/C++, and compiling with "gcc -O1 -S file.c" to see the assembly gcc generated" ([source](https://news.ycombinator.com/item?id=48081165)) "You can do that in GCC now (-ftrivial-auto-var-init=zero). There are a few projects that decided to enable this by default." ([source](https://news.ycombinator.com/item?id=46487002)) "GCC -Wall what tells me about most implicit casts going on (which I mostly ignore). But not all of them." ([source](https://news.ycombinator.com/item?id=47717744))
- Supports many targets, including embedded (3 comments): "their mutually compatible, but completely standards non-conformant extensions that make writing for embedded reasonable" ([source](https://news.ycombinator.com/item?id=48974439)) "Well it support more targets then LLVM and in most cases it generates similar if not better executable." ([source](https://news.ycombinator.com/item?id=47964703)) "If i cannot use GCC i cannot compile to half the embedded platforms i work with on a daily basis." ([source](https://news.ycombinator.com/item?id=47987570))
- Strong code generation (4 comments): "If there's one thing compilers do well is pattern match on code patterns and replace with more efficient ones" ([source](https://news.ycombinator.com/item?id=46376286)) "llvm/gcc won the compiler world because they blew the codegen of proprietary compilers out of the water" ([source](https://news.ycombinator.com/item?id=47053849)) "Well it support more targets then LLVM and in most cases it generates similar if not better executable." ([source](https://news.ycombinator.com/item?id=47964703))

## What people warn about

- Misses obvious optimization opportunities (3 comments): "GCC and LLVM can find some amazing optimizations, but they also consistently miss very obvious optimization opportunities" ([source](https://news.ycombinator.com/item?id=46143603)) "GCC generates branchless code for 'is_divisible_by_6', which is just worse than 'is_divisible_by_6_optimal' in all cases." ([source](https://news.ycombinator.com/item?id=46144340)) "GCC has historically been a bit of a pig about -Os, my favorite example is on x86 where it will emit a runtime divide" ([source](https://news.ycombinator.com/item?id=49110730))
- Hard to bootstrap and cross-compile (3 comments): "Getting all of LLVM mesa linux cmake ninja glibc gcc binutils xorg KDE to work is more work than in 2005 or 2010." ([source](https://news.ycombinator.com/item?id=46711673)) "To get a GCC cross-compile for a given set of architecture triples, one needs a complete graph of GCC toolchains" ([source](https://news.ycombinator.com/item?id=50115759)) "bootstrapping older GCC and LLVM versions on modern systems is far from trivial and typically requires patching" ([source](https://news.ycombinator.com/item?id=48167195))
- Difficult to extend with modern techniques (2 comments): "gcc was and is an incredible achievement, but it is traditionally considered difficult to implement many modern compiler techqniques in it" ([source](https://news.ycombinator.com/item?id=46378328)) "he specifically opposed exporting the AST, which makes a whole bunch of useful programming tools difficult or impossible" ([source](https://news.ycombinator.com/item?id=46295432))

## Alternatives hackers recommend

- [Clang](https://hackerapproved.com/p/clang.md): 74 recommend
- [Free Pascal compiler](https://hackerapproved.com/p/free-pascal.md): 38 recommend
- [GraalVM Native Image](https://hackerapproved.com/p/graalvm-native-image.md): 31 recommend
- [.NET Native AOT](https://hackerapproved.com/p/net-native-aot.md): 26 recommend
- [Cython](https://hackerapproved.com/p/cython.md): 22 recommend

## Cite as

Hacker Approved, "GCC", https://hackerapproved.com/p/gcc/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
