Hacker ApprovedDepartments

SDCC Small Device C Compiler

Ranked 8 of 18 c compilers by recommenders

Free C compiler for 8051, STM8, Z80 and 6502 microcontrollers, a big step up from assembly. Caveat: quirky, with bugs and a less mature 6502 port.

Free C compiler for 8051, STM8, Z80 and 6502 microcontrollers, a big step up from assembly. Caveat: quirky, with bugs and a less mature 6502 port.

16 people gave an opinion

recommend it
12
criticize it
4
approval share
75%
Each figure is one person. RecommendsCriticizes

Recommended in 3 of 13 months

  1. November 2025: not recommended
  2. December 2025: recommended
  3. January 2026: not recommended
  4. February 2026: not recommended
  5. March 2026: not recommended
  6. April 2026: not recommended
  7. May 2026: not recommended
  8. June 2026: not recommended
  9. July 2026: not recommended
  10. August 2026: not recommended
  11. September 2026: recommended
  12. October 2026: recommended
  13. November 2026: not recommended (month in progress)

Why it doesn’t carry the badge

  • 12 people recommend itNeeds 10 or more, met.
  • 3 recommenders for every criticNeeds 2 to 1 or better, met.
  • Recommended in 3 of 13 monthsNeeds 4 or more, not 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

  • Serviceable across many microcontrollers

    “sdcc is a perfectly good compiler which is sufficient for a lot of 8051 applications”

    Comment from 11 Dec 2025 in “Do 8051/8031 assembly like its 1984”

    “I've been using 4.4.0 which is fine for Z80 code”

    Comment from 2 Dec 2025 in “LLVM-MOS – Clang LLVM fork targeting the 6502”

    “Has worked well enough for me on 8051 and stm8”

    Comment from 19 Sep 2026 in “SDCC – Small Device C Compiler”

What people warn about

Each mark is one comment

  • Buggy and quirky output

    “never ran into "bugs" as in this is just broken, but it's quirky for sure”

    Comment from 19 Sep 2026 in “SDCC – Small Device C Compiler”

    “when you have large code, bugs will find you”

    Comment from 19 Sep 2026 in “SDCC – Small Device C Compiler”

    “It is buggy as hell, but it is free.”

    Comment from 19 Sep 2026 in “SDCC – Small Device C Compiler”
  • Immature 6502 code generation

    “The 6502 port has been usable, but doesn't seem fully mature.”

    Comment from 1 Dec 2025 in “LLVM-MOS – Clang LLVM fork targeting the 6502”

    “even if the codegen for 6502 needs a lot of work right now”

    Comment from 1 Dec 2025 in “LLVM-MOS – Clang LLVM fork targeting the 6502”
  • Optimizer removes or mangles code

    “Slightly larger switch() statement and you'll run into peephole optimizer just eating away at jump target instructions”

    Comment from 19 Sep 2026 in “SDCC – Small Device C Compiler”

    “compiler optimized away some 'empty' loops a little bit too aggressively”

    Comment from 19 Sep 2026 in “SDCC – Small Device C Compiler”

    “but SDCC indeed ignored 'volatile'”

    Comment from 19 Sep 2026 in “SDCC – Small Device C Compiler”
  • Suboptimal generated code

    “stm8 array access is suboptimal.”

    Comment from 19 Sep 2026 in “SDCC – Small Device C Compiler”

    “SDCC's output was not optimized”

    Comment from 19 Sep 2026 in “SDCC – Small Device C Compiler”

Other c compilers people recommend

The four most recommended other c 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.

SDCC Small Device C Compiler compared with 4 alternatives
ProductRecommendCriticizeApprovalMonthsOwnedBadge
Fil-C1606073%13—Approved
Claude's C Compiler398332%5——
Visual C++291763%12——
Tiny C Compiler (TCC)22388%9—Approved
SDCC Small Device C CompilerThis page12475%3——
See all 18 c compilers, ranked

What people said

18 of the 19 comments that mention it, newest first. Each links to the original comment.

“For 8051 it's waaay better at optimization than industry standard Keil C51, and of course sdcc.”

MixedComment from 11 Oct 2026 in “Grieving the loss of details”

“stm8 array access is suboptimal.”

CriticizesComment from 19 Sep 2026 in “SDCC – Small Device C Compiler”

“but SDCC indeed ignored 'volatile'”

CriticizesComment from 19 Sep 2026 in “SDCC – Small Device C Compiler”

“Slightly larger switch() statement and you'll run into peephole optimizer just eating away at jump target instructions”

MixedComment from 19 Sep 2026 in “SDCC – Small Device C Compiler”

“It was a huge step up from writing assembly.”

RecommendsComment from 19 Sep 2026 in “SDCC – Small Device C Compiler”

“spending more time reading the assembly to figure out workarounds for the compiler than actually writing C code”

MixedComment from 19 Sep 2026 in “SDCC – Small Device C Compiler”

“SDCC's output was not optimized”

CriticizesComment from 19 Sep 2026 in “SDCC – Small Device C Compiler”

“compiler optimized away some 'empty' loops a little bit too aggressively”

CriticizesComment from 19 Sep 2026 in “SDCC – Small Device C Compiler”

“has been a nice resource for a variety of MCUs”

RecommendsComment from 19 Sep 2026 in “SDCC – Small Device C Compiler”

“when you have large code, bugs will find you”

CriticizesComment from 19 Sep 2026 in “SDCC – Small Device C Compiler”

“Has worked well enough for me on 8051 and stm8”

RecommendsComment from 19 Sep 2026 in “SDCC – Small Device C Compiler”

“never ran into "bugs" as in this is just broken, but it's quirky for sure”

MixedComment from 19 Sep 2026 in “SDCC – Small Device C Compiler”

“It is buggy as hell, but it is free.”

MixedComment from 19 Sep 2026 in “SDCC – Small Device C Compiler”

“sdcc is a perfectly good compiler which is sufficient for a lot of 8051 applications”

RecommendsComment from 11 Dec 2025 in “Do 8051/8031 assembly like its 1984”

“even SDCC has uptodate C standard support (better than MSVC actually)”

RecommendsComment from 10 Dec 2025 in “Dependable C”

“I've been using 4.4.0 which is fine for Z80 code”

MixedComment from 2 Dec 2025 in “LLVM-MOS – Clang LLVM fork targeting the 6502”

“The 6502 port has been usable, but doesn't seem fully mature.”

MixedComment from 1 Dec 2025 in “LLVM-MOS – Clang LLVM fork targeting the 6502”

“even if the codegen for 6502 needs a lot of work right now”

MixedComment from 1 Dec 2025 in “LLVM-MOS – Clang LLVM fork targeting the 6502”

Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.