I have once heard a saying,we could live without linux, but we definitely could not live without gcc. It seems, there is only one C compiler in the Linux world. Is there any alternatives to gcc? Do programmers under AIX/HPUX/Solaris use only gcc to develop programs?
There's certainly at least one alternative to gcc on Linux: clang is a C-compiler (and related dialects, although as far as I can see, the C frontend is much more mature than the other dialects) utilising LLVM.
With roughly 15 million lines of code in 2019, GCC is one of the biggest free programs in existence. It has played an important role in the growth of free software, as both a tool and an example.
Clang is much faster and uses far less memory than GCC. Clang aims to provide extremely clear and concise diagnostics (error and warning messages), and includes support for expressive diagnostics. GCC's warnings are sometimes acceptable, but are often confusing and it does not support expressive diagnostics.
GCC, formerly for "GNU C Compiler", has grown over times to support many languages such as C ( gcc ), C++ ( g++ ), Objective-C, Objective-C++, Java ( gcj ), Fortran ( gfortran ), Ada ( gnat ), Go ( gccgo ), OpenMP, Cilk Plus, and OpenAcc. It is now referred to as "GNU Compiler Collection".
There's certainly at least one alternative to gcc on Linux: clang is a C-compiler (and related dialects, although as far as I can see, the C frontend is much more mature than the other dialects) utilising LLVM. Apple supports the development of LLVM & friends, I think; it's useful for their Grand Central Dispatch/OpenCL stuff, IIRC.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With