{"slug": "sdcc", "name": "SDCC", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "", "recommenders": 3, "commenters": 7, "warners": 2, "score": 1.234, "rising": 0.35, "first": "2025-12-01", "latest": "2026-09-19", "why": "Whereas sdcc works brilliantly for z80 lineage processors.", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 3, "neutral": 2, "compare": 0, "warn": 2}, "spark": [0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], "listed": true, "loved": [], "caveat": "", "short_quote": "Whereas sdcc works brilliantly for z80 lineage processors.", "kind": "", "icon": true, "domain": null, "github_repo": null, "official_url": "https://sdcc.sourceforge.net/", "pricing": "", "aliases": ["SDCC"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 796232464, "item_id": 49764529, "url": "https://news.ycombinator.com/item?id=49764529", "by": "nickcw", "date": "2026-09-19", "version": null, "stance": "recommend", "quote": "Whereas sdcc works brilliantly for z80 lineage processors.", "excerpt": "I used sdcc for an 8051 based commercial project a while back. I seem to remember spending more time reading the assembly to figure out workarounds for the compiler than actually writing C code! Whereas sdcc works brilliantly for z80 lineage processors. I wrote quite a lot of C for Gameboy recently and didn't find a single compiler bug in sdcc which revised my opinion of it upwards greatly.", "context": "embedded developer", "use_case": "Z80/Gameboy C compilation", "switched_from": "", "story": "SDCC \u2013 Small Device C Compiler"}, {"id": 739457488, "item_id": 46216093, "url": "https://news.ycombinator.com/item?id=46216093", "by": "flohofwoe", "date": "2025-12-10", "version": null, "stance": "recommend", "quote": "even SDCC has uptodate C standard support (better than MSVC actually)", "excerpt": "> For example, it can be compiled on basically any platform that contains a CPU. It will be pretty hard to find a platform which doesn't have at least a C99 compiler. For instance even SDCC has uptodate C standard support (better than MSVC actually), and that covers most 8-bit CPUs all the way back to the 70's: https://sdcc.sourceforge.net/ Also let's not forget that C99 is a quarter century old by now. That's about ", "context": "", "use_case": "", "switched_from": "", "story": "Dependable C"}, {"id": 737703968, "item_id": 46106498, "url": "https://news.ycombinator.com/item?id=46106498", "by": "nineteen999", "date": "2025-12-01", "version": null, "stance": "recommend", "quote": "Im just happy to finally have an 8-bit C compiler that supports both targets", "excerpt": "What's your take on sdcc 6502 support at the moment, if you have one? Im just happy to finally have an 8-bit C compiler that supports both targets, even if the codegen for 6502 needs a lot of work right now. I'd happily take a llvm-z80 and llvm-6502 over sdcc if both were available Edit: oh wow, look at that https://github.com/grapereader/llvm-z80. Aw but not touched for 12 years.", "context": "", "use_case": "8-bit C compilation", "switched_from": "", "story": "LLVM-MOS \u2013 Clang LLVM fork targeting the 6502"}]}], "caveats": [{"label": "", "summary": "", "quotes": [{"id": 796304512, "item_id": 49769032, "url": "https://news.ycombinator.com/item?id=49769032", "by": "raphman", "date": "2026-09-19", "version": null, "stance": "warn", "quote": "but SDCC indeed ignored 'volatile'", "excerpt": "Might be. There certainly were bugs in my understanding of micro-controllers and compilers at the time... EDIT: but SDCC indeed ignored 'volatile': https://sourceforge.net/p/sdcc/bugs/436/", "context": "", "use_case": "", "switched_from": "", "story": "SDCC \u2013 Small Device C Compiler"}, {"id": 796220464, "item_id": 49763779, "url": "https://news.ycombinator.com/item?id=49763779", "by": "Jyaif", "date": "2026-09-19", "version": null, "stance": "warn", "quote": "because SDCC's output was not optimized", "excerpt": "What a coincidence, just yesterday I asked an LLM to generate a C compiler for the 8051 because SDCC's output was not optimized. Within an 1.5 hour it was correctly compiling my project at 60% of the size of what SDCC generates. One or 2 quota refreshes later it passed the SDCC test suite and optimized soft floats. https://github.com/jyaif/cc51", "context": "", "use_case": "", "switched_from": "", "story": "SDCC \u2013 Small Device C Compiler"}]}], "who": [{"by": "nickcw", "context": "embedded developer", "url": "https://news.ycombinator.com/item?id=49764529", "date": "2026-09-19"}], "tags": [], "use_cases": ["8051 programming", "z80/gameboy c compilation", "toy projects", "8-bit c compilation"], "compared": [], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=49762744", "title": "SDCC \u2013 Small Device C Compiler", "mentions": 5}, {"url": "https://news.ycombinator.com/item?id=46214091", "title": "Dependable C", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46098359", "title": "LLVM-MOS \u2013 Clang LLVM fork targeting the 6502", "mentions": 1}], "sentiment_by_month": {"2025-11": {}, "2025-12": {"recommend": 2}, "2026-01": {}, "2026-02": {}, "2026-03": {}, "2026-04": {}, "2026-05": {}, "2026-06": {}, "2026-07": {}, "2026-08": {}, "2026-09": {"neutral": 2, "warn": 2, "recommend": 1}, "2026-10": {}}, "versions": [], "version_unnamed": 0, "family_ref": null, "runs_on": null, "lines": [], "quotes": [{"id": 796304512, "item_id": 49769032, "url": "https://news.ycombinator.com/item?id=49769032", "by": "raphman", "date": "2026-09-19", "version": null, "stance": "warn", "quote": "but SDCC indeed ignored 'volatile'", "excerpt": "Might be. There certainly were bugs in my understanding of micro-controllers and compilers at the time... EDIT: but SDCC indeed ignored 'volatile': https://sourceforge.net/p/sdcc/bugs/436/", "context": "", "use_case": "", "switched_from": "", "story": "SDCC \u2013 Small Device C Compiler"}, {"id": 796241504, "item_id": 49765094, "url": "https://news.ycombinator.com/item?id=49765094", "by": "andrewstuart", "date": "2026-09-19", "version": null, "stance": "neutral", "quote": "I use SDCC for 8051.", "excerpt": "I use SDCC for 8051. I have started to notice that programming with an LLM it seems to make little difference if I get it to write the entire program in assembly language rather than c.", "context": "", "use_case": "8051 programming", "switched_from": "", "story": "SDCC \u2013 Small Device C Compiler"}, {"id": 796232464, "item_id": 49764529, "url": "https://news.ycombinator.com/item?id=49764529", "by": "nickcw", "date": "2026-09-19", "version": null, "stance": "recommend", "quote": "Whereas sdcc works brilliantly for z80 lineage processors.", "excerpt": "I used sdcc for an 8051 based commercial project a while back. I seem to remember spending more time reading the assembly to figure out workarounds for the compiler than actually writing C code! Whereas sdcc works brilliantly for z80 lineage processors. I wrote quite a lot of C for Gameboy recently and didn't find a single compiler bug in sdcc which revised my opinion of it upwards greatly.", "context": "embedded developer", "use_case": "Z80/Gameboy C compilation", "switched_from": "", "story": "SDCC \u2013 Small Device C Compiler"}, {"id": 796220464, "item_id": 49763779, "url": "https://news.ycombinator.com/item?id=49763779", "by": "Jyaif", "date": "2026-09-19", "version": null, "stance": "warn", "quote": "because SDCC's output was not optimized", "excerpt": "What a coincidence, just yesterday I asked an LLM to generate a C compiler for the 8051 because SDCC's output was not optimized. Within an 1.5 hour it was correctly compiling my project at 60% of the size of what SDCC generates. One or 2 quota refreshes later it passed the SDCC test suite and optimized soft floats. https://github.com/jyaif/cc51", "context": "", "use_case": "", "switched_from": "", "story": "SDCC \u2013 Small Device C Compiler"}, {"id": 796212080, "item_id": 49763255, "url": "https://news.ycombinator.com/item?id=49763255", "by": "hacker_homie", "date": "2026-09-19", "version": null, "stance": "neutral", "quote": "I used it for some toy projects never ran into \"bugs\" as in this is just broken, but it's quirky for sure.", "excerpt": "I used it for some toy projects never ran into \"bugs\" as in this is just broken, but it's quirky for sure.", "context": "", "use_case": "toy projects", "switched_from": "", "story": "SDCC \u2013 Small Device C Compiler"}, {"id": 739457488, "item_id": 46216093, "url": "https://news.ycombinator.com/item?id=46216093", "by": "flohofwoe", "date": "2025-12-10", "version": null, "stance": "recommend", "quote": "even SDCC has uptodate C standard support (better than MSVC actually)", "excerpt": "> For example, it can be compiled on basically any platform that contains a CPU. It will be pretty hard to find a platform which doesn't have at least a C99 compiler. For instance even SDCC has uptodate C standard support (better than MSVC actually), and that covers most 8-bit CPUs all the way back to the 70's: https://sdcc.sourceforge.net/ Also let's not forget that C99 is a quarter century old by now. That's about ", "context": "", "use_case": "", "switched_from": "", "story": "Dependable C"}, {"id": 737703968, "item_id": 46106498, "url": "https://news.ycombinator.com/item?id=46106498", "by": "nineteen999", "date": "2025-12-01", "version": null, "stance": "recommend", "quote": "Im just happy to finally have an 8-bit C compiler that supports both targets", "excerpt": "What's your take on sdcc 6502 support at the moment, if you have one? Im just happy to finally have an 8-bit C compiler that supports both targets, even if the codegen for 6502 needs a lot of work right now. I'd happily take a llvm-z80 and llvm-6502 over sdcc if both were available Edit: oh wow, look at that https://github.com/grapereader/llvm-z80. Aw but not touched for 12 years.", "context": "", "use_case": "8-bit C compilation", "switched_from": "", "story": "LLVM-MOS \u2013 Clang LLVM fork targeting the 6502"}]}