Clang
Ranked 2 of 26 compilers by recommenders
Recommended for a polished, feature-rich C and C++ compiler with strong optimization and wide platform support. Common caveat: it sometimes generates poor code and has footguns.
Recommended for a polished, feature-rich C and C++ compiler with strong optimization and wide platform support. Common caveat: it sometimes generates poor code and has footguns.
124 people gave an opinion
- recommend it
- 74
- criticize it
- 50
- approval share
- 60%
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)
Why it doesn’t carry the badge
- 74 people recommend itNeeds 10 or more, met.
- 1.4 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
Works well across platforms and compilers
“It was a cross-platform project and worked equally well with GCC, Clang and MS Visual C++.”
Comment from 10 Feb 2026 in “Thoughts on Generating C” “Clang is the better alternative to MinGW because it can use standard Windows libraries”
Comment from 15 Feb 2026 in “I Fixed Windows Native Development” “you even still get (mostly complete) MSVC ABI-compatibility if you compile with clang”
Comment from 15 Feb 2026 in “I Fixed Windows Native Development” - Comment from 16 Feb 2026 in “I Fixed Windows Native Development”
- Comment from 11 Dec 2025 in “Rust in the kernel is no longer experimental”
Strong optimization and vectorization
“I was pleasantly surprised by the autovectorization quality with recent clang at work a few days ago.”
Comment from 6 Nov 2025 in “The state of SIMD in Rust in 2025” “Clang is far less ideology-focused and its structure makes implementing optimisations easier”
Comment from 25 Dec 2025 in “When Compilers Surprise You” “Clang pretty readily sees that it can use SIMD instructions and really optimizes this”
Comment from 11 Feb 2026 in “Both GCC and Clang generate strange/inefficient code” - Comment from 11 Feb 2026 in “Both GCC and Clang generate strange/inefficient code”
- Comment from 12 Jan 2026 in “Zen-C: Write like a high-level language, run like C”
Preferred over MSVC and MinGW
“Most of the proprietary compilers have been slinking away from using EDG to using clang”
Comment from 30 Sep 2026 in “EDG C++ front-end goes public” “Clang is the better alternative to MinGW because it can use standard Windows libraries”
Comment from 15 Feb 2026 in “I Fixed Windows Native Development” “With modern Clang there really isn't a justifiable reason to use MinGW”
Comment from 16 Feb 2026 in “I Fixed Windows Native Development” - Comment from 25 Dec 2025 in “Python 3.15's interpreter for Windows should be 15% faster”
- Comment from 27 Sep 2026 in “Writing Efficient C++ Code (2013)”
Many features and polish
“Clang is better than anything I have used in terms of the amount of options and features it has and also how polished it is”
Comment from 11 May 2026 in “Making your own programming language is easier than you think (but also harder)” “C compilers just have everything you can think of because everythin is first implemented there.”
Comment from 17 Apr 2026 in “30 Years of HPC: many hardware advances, little adoption of new languages” “the language extensions Apple and Google have been adding to clang”
Comment from 11 Aug 2026 in “Tail-call optimization in C is relatively recent”
What people warn about
Each mark is one comment
Generates inefficient code in places
“writing zeros to memory (which are never used thereafter), there's no way that particular code is optimal”
Comment from 7 Feb 2026 in “Both GCC and Clang generate strange/inefficient code” “clang is generating kind of crap code here, and this change gets good codegen out of clang”
Comment from 14 Jul 2026 in “Quadrupling code performance with a "useless" if” “Out of the 6 pieces of Assembly code in the article, 2 of them are definitely inefficient”
Comment from 11 Feb 2026 in “Both GCC and Clang generate strange/inefficient code” - Comment from 3 Dec 2025 in “You can't fool the optimizer”
- Comment from 25 May 2026 in “C extensions, portability, and alternative compilers”
Footguns, hard limits, false warnings
“Clang has a lot of footguns, and filing bugs about "regression compared to GCC" does not actually get them fixed.”
Comment from 5 Nov 2025 in “Precompiled headers and why Squid won't be using them (2023)” “Clang also complains about perfectly legal compound IF statements and/or complex IF conditions”
Comment from 3 Apr 2026 in “Big-Endian Testing with QEMU” “You really shouldn't be using Clang in production because it has all sorts of hard limitations”
Comment from 5 Nov 2025 in “Precompiled headers and why Squid won't be using them (2023)” Non-standard extensions hurt conformance
“Another issue I've had with strict conformance in gcc/clang even with regular C is that it will always replace #include with its own copy”
Comment from 19 Jul 2026 in “Neither GCC nor Clang are compliant with standard C++” “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++”
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 |
|---|---|---|---|---|---|---|
| GCC | 138 | 123 | 53% | 12 | 15 yrs9 owners | — |
| ClangThis page | 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 164 comments that mention it, newest first. Each links to the original comment.
“for each individual user defecting to clang must be looking very attractive right now”
“Most of the proprietary compilers have been slinking away from using EDG to using clang”
“Some compilers are better than others (Clang>MSVC for example)”
“the language extensions Apple and Google have been adding to clang”
“clang is driving C extensions for safety that should have long been part of the language”
“their mutually compatible, but completely standards non-conformant extensions that make writing for embedded reasonable”
“Another issue I've had with strict conformance in gcc/clang even with regular C is that it will always replace #include with its own copy”
“clang is generating kind of crap code here, and this change gets good codegen out of clang”
“in gcc and clang one must use "-ffp-contract=fast", for enabling FMA instructions.”
“there is even a bug report from QEMU to Clang because it failed to optimize in -O0”
“If you passed the actual '__m128' down the function call chain instead, clang and gcc would then do the right thing.”
“Clang is better than anything I have used in terms of the amount of options and features it has and also how polished it is”
“C compilers just have everything you can think of because everythin is first implemented there.”
“For low runtime footprint you are probably better off with one of those two compilers”
“The facility doesn't seem to have really gone anywhere even if it technically works; I wonder why.”
“Clang also complains about perfectly legal compound IF statements and/or complex IF conditions”
“They should adopt maintenance of clang and bless it as the reference compiler.”
“With modern Clang there really isn't a justifiable reason to use MinGW”
“you even still get (mostly complete) MSVC ABI-compatibility if you compile with clang”
“Clang is the better alternative to MinGW because it can use standard Windows libraries”
“Out of the 6 pieces of Assembly code in the article, 2 of them are definitely inefficient”
“both compilers have done quite heroic and spectacular jobs of optimizing code”
“Clang pretty readily sees that it can use SIMD instructions and really optimizes this”
“It was a cross-platform project and worked equally well with GCC, Clang and MS Visual C++.”
“Clang's solution (presented at the end of the Wikipedia article you linked) seem much better”
“writing zeros to memory (which are never used thereafter), there's no way that particular code is optimal”
“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.”
“That feels like the right abstraction and it was very easy to set up a VPN with zerotier like that”
“Clang and gcc do a lot of the heavy lifting regarding optimisation”
“sooner or later one will need both `clang` and `gcc`, because they're equivalent only in theory”
“So far I think using clang instead of MSVC compiler is a strict win?”
“Clang is far less ideology-focused and its structure makes implementing optimisations easier”
“Maybe they are not the right solution, but they are working on the right problem.”
“Clang is the better model because it results in more innovation and more software that I can enjoy”
“I like that you can at least compile Linux with Clang and GCC”
“in normal C++ there are GCC or Clang (I forget which) extensions for detecting threading issues”
“I find gcc and clang can inline functions, but can't decide to break apart a struct”
“I was pleasantly surprised by the autovectorization quality with recent clang at work a few days ago.”
“Clang has a lot of footguns, and filing bugs about "regression compared to GCC" does not actually get them fixed.”
“You really shouldn't be using Clang in production because it has all sorts of hard limitations”
Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.