Skip to main content

Timeline for Why are there so few C compilers?

Current License: CC BY-SA 3.0

34 events
when toggle format what by license comment
Dec 16, 2021 at 19:59 comment added Thorbjørn Ravn Andersen You might enjoy OTCC - 2048 bytes - bellard.org/otcc
Mar 24, 2015 at 19:08 history tweeted twitter.com/#!/StackProgrammer/status/580446204468813825
Mar 23, 2015 at 19:50 history reopened Thomas Owens
Feb 25, 2015 at 12:37 review Reopen votes
Feb 25, 2015 at 18:50
Feb 25, 2015 at 12:34 history closed Kilian Foth
Eric Lippert
Dan Pichelman
Thomas Owens
Needs details or clarity
Feb 24, 2015 at 2:36 comment added Radian @Leushenko - I suppose if the question was worded, "Why are there so few C compilers on the desktop" I would see the point. And I'd be very careful talking about being "competitive" (assuming you mean based on code generation) - cross-compilers that I use such as IAR or Keil routinely generate smaller & faster code than GCC (haven't benchmarked Clang as a cross-compiler). Do you have a lot of experience with cross compilers? I'm not sure I see your point, particularly when GCC (and perhaps Clang) /is/ used in the same (operational?) space as the many cross-compilers available.
Feb 23, 2015 at 23:00 comment added anon @Radian proportion of different types of CPU doesn't really affect the question at all. Even assuming each one has its own compiler, those still aren't competitive with GCC/Clang in GCC/Clang's operational space (or more likely don't exist in it at all).
Feb 23, 2015 at 20:27 comment added Radian I can't improve on Eric Lippert's answer regarding this question's false premise; this question is very naive in that it completely disregards (or is ignorant of) the 97% of CPUs (literally 10s of billions of them) that run in embedded systems. Not everything is a PC or a server... BTW the 97% and 10s of billions comes from a study that I read within the last year or two (Gartner?), I'm not just pulling the figures out of thin air, but I don't have the time to track it down right now, sorry...
Feb 22, 2015 at 2:40 comment added Paul Draper "There are a handful of others, far too obscure for the average person to name"...isn't that every SML compiler?
Feb 20, 2015 at 19:44 comment added Federico Poloni It's a bit like asking "why are there so few browsers, apart from Firefox and Chrome?" --- there are many more, but they are platform-specific, less widespread and/or with less features. It seems a common trend that in every area the community tends to converge on a very small number of big players. Another example is search engines, or Linux GUIs.
Feb 20, 2015 at 19:42 comment added supercat @tepples: Any idea why my answer on that "trusting trust" question you linked got -4 votes? It suggest a procedure which should allow one to ensure that one is using a reliable compiler.
Feb 20, 2015 at 14:31 history protected gnat
Feb 20, 2015 at 9:43 comment added user63869 40 something, free, is not few: Free C/C++ Compilers and Interpreters, Free C/C++ Compilers for Handheld Devices, Micro-controllers, Embedded Systems and Calculators both at thefreecountry.com
Feb 20, 2015 at 9:01 comment added Daniel It's all a question of perception: For embedded devices (which take > 98% of the annual world-wide CPU production, about 50% still being 8-Bit MCUs or DSPs) there are hundreds of commercial C compilers. You probably have never heard about Greenhills or Tasking. However, both are dominant in the automotive industry. Given that even an ordinary car today contains 30–90 built-in microprocessors, there are probably more CPUs in the world running code from one of these compilers than, lets say, code generated by MSVC or clang.
Feb 20, 2015 at 4:03 comment added anon In context I should probably mention that this question was actually inspired by me being unable to find an existing C implementation that suited a very unusual requirement (spent ages looking for a C interpreter - I have my reasons - that at least tried to be complete and compliant. Far as I can tell it doesn't exist. Yes I know this is a ridiculous edge case).
Feb 20, 2015 at 3:42 comment added Damian Yerrick @BryanChen Compiler monoculture leads to things like Ken Thompson's "trusting trust" virus. The more compilers in use, the easier it is to use David A. Wheeler's "diverse double-compiling" construction to defeat "trusting trust".
Feb 20, 2015 at 1:38 vote accept CommunityBot
Feb 19, 2015 at 18:53 comment added Eric Lippert "Why" questions are bad questions for this site at the best of times, and "why not?" questions are worse. If I were to meet you at a party and ask "so, why don't you race sailboats?" I think you'd rightly find it to be an odd question. You don't need to provide a justification for NOT engaging in a technically difficult, physically risky and very expensive hobby. Writing any non-trivial piece of software is expensive, difficult and risky and therefore requires an enormous motivator. A better question would be "why are there so many C compilers?" It is surprising that there is more than one.
Feb 19, 2015 at 18:45 comment added Eric Lippert The question is based upon a false premise. Analog Devices, armcc, Bruce's C Compiler, the Bare-C Cross Compiler, the Borland compiler, the clang compiler, the Cosmic C compiler, the CodeWarrior compiler, the dokto compiler, the Ericsson compiler, and I'm not even out of the first five letters of the alphabet yet. There is an insanely large number of C compilers. The question is "why are there so few C compilers, if we don't count these several dozens as real C compilers?" You have defined away the vast majority of C compilers as not interesting, which is why there are not very many of them.
Feb 19, 2015 at 18:21 comment added eckes @Rufflewind The biggest advantage of the MSVC Compiler is not the compiler but the debugger. IMHO, if the debugger wasn't that excellent, almost no C code would be compiled with MSVC anymore. But no debugger could keep up with the MSVC Debugger. It's outstanding.
Feb 19, 2015 at 17:44 comment added Peter Mortensen What about CodeWarrior and Borland C++?
Feb 19, 2015 at 13:45 answer added soru timeline score: 7
Feb 19, 2015 at 10:32 comment added itsbruce Writing a Scheme compiler/interpreter in your newly designed language is a simple way to test it (and its compiler). tiny spec, much good sample code with which to test. So there are as many Scheme implementations out there as there are languages, more or less.
Feb 19, 2015 at 10:14 answer added pjc50 timeline score: 8
Feb 19, 2015 at 8:58 comment added Robert Munn If an excellent modern optimizing compiler exists for a target platform, why bother re-inventing the wheel? Also, lots of time and energy is being dedicated to inventing new languages ( Go, Scala, Clojure, Dart, Swift, etc. ) and writing compilers for them, and more energy is being dedicated to Java and the JVM. C by comparison is very mature.
Feb 19, 2015 at 6:48 review Close votes
Feb 25, 2015 at 12:34
Feb 19, 2015 at 6:22 answer added Jörg W Mittag timeline score: 73
Feb 19, 2015 at 6:02 answer added Basile Starynkevitch timeline score: 162
Feb 19, 2015 at 3:51 comment added Doval I can't keep all of C's stupid little idiosyncrasies and gotchas in my head. SML is a relatively simple language by comparison. Also, there's a ton of C code out there that may or may not be using those obscure language features or GCC extensions or relying on implementation-defined behavior or even undefined-behavior and the author will complain about how your compiler does things the standard says it's allowed to do but breaks their code. Meanwhile many of the SML compilers may be academic experiments to see what the language would be like if you added X feature.
Feb 19, 2015 at 2:57 comment added Bryan Chen how many compilers do you need to compile your C code?
Feb 19, 2015 at 2:51 comment added user40980 Wikipedia lists quite a few C compilers. They get very common when you find yourself in the embedded realm.
Feb 19, 2015 at 2:50 comment added Rufflewind MSVC still counts, as a C89 compiler at least. Probably more popular than Intel even.
Feb 19, 2015 at 2:41 answer added Telastyn timeline score: 5
Feb 19, 2015 at 2:26 history asked anon CC BY-SA 3.0