What is your preferred C compiler (If you have any)

33 views
Skip to first unread message

jo...@jocadbz.xyz

unread,
Aug 11, 2025, 7:42:55 PMAug 11
to tec...@googlegroups.com
Hello.

Quick talk just to test out how this mailing list is working. Do you guys have a preferred C compiler?

I do know that GCC is the most common, but there are a ton of alternatives as far as I know. So far here are my ratings:

  • GCC

Probably the most stable. Great support, great commands, not much I can talk about it. It does get slow on big projects from what I've heard, probably because it is very monolithic on it's design.

  • Clang
The fastest and newer alternative. Really interesting debug messages and a great experience overall. 

  • TCC
Good for fast compilations, but it sucks ass on modern standards. Not really a problem 90% of the time, but using this for a big codebase is basically suicide.

I do know about other strange iterations (ICC, MSVC, Pelles) but I never had any chance to test those. Would like any opinions or criticisms on this. Thanks to all!

  • Joca  

Hexa

unread,
Aug 11, 2025, 8:15:10 PMAug 11
to tpot
Definitely Clang.
I only ever use clang and gcc, and clang is definitely a big improvement over gcc in terms of debugging.

alex

unread,
Aug 11, 2025, 8:46:15 PMAug 11
to tpot
Joca, this is a stupid question, there are not many production ready C
compilers. Obvious answer is gcc, then clang (may depend on ecosystem too, I
think Apple likes clang more?). Zig's compiler is great too (currently LLVM
based, so I'm not too sure if there's a huge difference between it and clang
other than the AMAZING cross compilation.)

Since I've clarified the stupidity of such question, I'd like to answer a
different question: What are some interesting C compilers?

Here's a list:
- https://github.com/xorvoid/sectorc - supports a subset of C, and can fit in a
  boot sector (512 bytes)

- https://github.com/Battelle/movfuscator - compiles into only mov
  instructions. Fascinating.

- https://bellard.org/otcc/otcc.c - "Obfuscated Tiny C Compiler". Only
  generates i386 asm. It's 2048 bytes! Of course, only compiles a subset.

- https://github.com/cksystemsteaching/selfie - Particularly cool because it's
  a single 12k LoC file that is *very* well organized and is used for teaching
  a few things: 1) compilers, 2) RISC-V architecture, 3) VMs! That said, it
  implements a compiler to RISC-V, and a VM that emulates RISC-V! Also, it
  compiles a *subset* of C.

Some more ordinary but still interesting ones are:
- https://bellard.org/tcc/ - based on otcc. Amazingly fast, not actively maintained
  anymore (however that doesn't mean it's not great. It can compile many
  projects. There are some forks out there providing extra features.)

- https://github.com/RealNeGate/Cuik - Modern C compiler written in.. C. Not
  very ready. I think the person who made this is really young? I dont
  remember, I was half asleep watching the Tsoding video about it.

- https://github.com/Vexu/arocc - written in Zig, looks cool, haven't tried.

On Tuesday, 12 August 2025 at 02:42:55 UTC+3 jo...@jocadbz.xyz wrote:

jo...@jocadbz.xyz

unread,
Aug 11, 2025, 9:07:13 PMAug 11
to tec...@googlegroups.com
I don't think this is a stupid question by any means.
there are not many production ready C compilers.
There are, they just didn't stand the test of time. We got pccm, BSD C, Aztec C, ACK, Lattice C, MPW, GCC, Turbo C, Megamax C, Acorn C, LabWindows, QuickC, Oracle C, MinGW, MSVC, CodeWarrior, LCC, etc, and mind you, those were all made before 2000, and seven of them are still in wide usage.

Like I said, I know GCC and Clang are the main competitors. But there are still environments where one of the compilers I listed above are still in use. That was the main point of my question.

But by the way, nice list.
--
You received this message because you are subscribed to the Google Groups "tpot" group.
To unsubscribe from this group and stop receiving emails from it, send an email to techpot+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/techpot/2781e12b-6636-48ff-a7e8-e1bbd873430bn%40googlegroups.com.

Alex

unread,
Aug 11, 2025, 10:35:05 PMAug 11
to tec...@googlegroups.com
Thank you for your list. A few notes: some of these are more than old: archaic,
one could say. That being said, I would say that MinGW's compiler -- since it's
a port of gcc -- doesn't count. Realistically, out of the ones you mentioned,
MSVC is the only one that is actively being used for modern, real world
projects. The other ones? just nostalgia (which, don't get me wrong, I respect)

Another one I think you may enjoy is the Amsterdam Compiler Kit
(https://github.com/davidgiven/ack), it's interesting because it's an entire
toolchain of compilers, supporting various frontends, and various backends.

According to the README, it has support for ANSI C, Pascal, Modula 2, Basic.
For backends, well, I won't list them here, but it supports many retro (and
some modern) assemblies. Not x86 though.

The other fascinating part about this is the author: Andrew Tanenbaum.
Tanenbaum is the creator of MINIX. Does that name ring a bell? It's the UNIX
clone that inspired Linux.

segfaul...@proton.me

unread,
Aug 11, 2025, 10:35:11 PMAug 11
to tec...@googlegroups.com
Side note why were there so many C compilers in general, it seems now there are 3 main ones but why is there never a consensus on just 1compiler.

jo...@jocadbz.xyz

unread,
Aug 11, 2025, 10:46:21 PMAug 11
to tec...@googlegroups.com
C was created in a time where you had to do machine-specific optimizations for things to run well. I think that is one of the main reasons.

A lot of the old and forgotten C compilers were made for dead platforms (eg. CodeWarrior was made for the Motorola 68K, that powered, besides computers, famous videogames such as NeoGeo and Genesis.)

Another reason is that with C, you can choose to do something in different ways on the backend. One compiler might prioritize serve a wide range of formats. Other might want to focus on a small memory footprint or specific device-related optimizations. It's really up for the compiler to decide how, and most of them are opinionated in that regard. So It's good that we have many of them.


jo...@jocadbz.xyz

unread,
Aug 11, 2025, 11:08:29 PMAug 11
to tec...@googlegroups.com
The other fascinating part about this is the author: Andrew Tanenbaum.

That guy is a legend. Probably one of the smartest programmers in history. (Although I wouldn't say top 10, we have Ken Thompson and Rob Pike stealing his spot XD)

He also wrote a specially good book I'm eager to mention here, Computer Networks. If The Art of Computer Programming is the "Bible of Programming", Computer Networks is the bible of networks. He dives into deep concepts in such a way that you never feel lost. Binged through the whole book while I was interning as a network technician, I recommend it a lot.

Alex

unread,
Aug 12, 2025, 7:55:16 PMAug 12
to tec...@googlegroups.com
Indeed his textbook 'Computer Networks' is legendary, my professor talked about it with such passion when he recommended it for his class.

Reply all
Reply to author
Forward
0 new messages