What good C compilers are available for Linux/UNIX?

F

Fritz Wuehler

Is there a list of good C compilers for Linux and UNIX? I know about gcc and
Solaris Studio. Are there any more worth looking into? I'm not concerned
about portability. Looking for correctness, standards conformance, maturity,
and intelligent presentation of options (not kitchen sink like gcc etc).
 
S

Seebs

Is there a list of good C compilers for Linux and UNIX? I know about gcc and
Solaris Studio. Are there any more worth looking into? I'm not concerned
about portability. Looking for correctness, standards conformance, maturity,
and intelligent presentation of options (not kitchen sink like gcc etc).

In practice, all I've seen anyone use is whatever the vendor's compiler is,
gcc, and maybe Intel's compiler for x86. Try a Unix programming group,
maybe?

FWIW, I don't know that "intelligent presentation of options" is specific
enough to be actionable.

-s
 
J

jacob navia

Le 17/05/11 19:36, Fritz Wuehler a écrit :
Is there a list of good C compilers for Linux and UNIX? I know about gcc and
Solaris Studio. Are there any more worth looking into? I'm not concerned
about portability. Looking for correctness, standards conformance, maturity,
and intelligent presentation of options (not kitchen sink like gcc etc).

The best compiler for linux is obviously Intel's compiler.
The fastest generated code as any benchmark will confirm you.

It has full compatibility with gcc. It is the best solution.

jacob
 
A

Angel

The best compiler for linux is obviously Intel's compiler.
The fastest generated code as any benchmark will confirm you.

It has full compatibility with gcc. It is the best solution.

Only if you actually run Linux on Intel. Linux isn't bound to a single
platform and will also run on Sparc, PowerPC and MIPS, just to name a
few.

The best general purpose compiler for Linux and most other Unixes is
still gcc, IMHO. The kernel and most libraries are made with gcc, so it
is the most compatible, and it is available for free on pretty much
every platform imaginable.
 
J

jacob navia

Le 17/05/11 22:51, Angel a écrit :
Only if you actually run Linux on Intel. Linux isn't bound to a single
platform and will also run on Sparc,

Sun compilers are the best there

PowerPC

For PowerPc IBM's compiler is the best. It has a lot of really specific
options for the processor, and gcc is awful. I never could compile
really big programs without hitting a code generation bug in that
platform (AIX). I compiled a Database code in C++ and the only compiler
that compiled all the code was IBM's. Maybe under linux gcc is
better. In any case it can probably compile the kernel without
getting into a bug.

and MIPS,

MIPS I do not know. Probably gcc is good enough for that
platform.

just to name a

I think you named all, or almost all.
 
A

Angel

Le 17/05/11 22:51, Angel a ?crit :

Sun compilers are the best there

I'm talking about Linux on Sparc, not about Sun Solaris.
PowerPC

For PowerPc IBM's compiler is the best. It has a lot of really specific
options for the processor, and gcc is awful. I never could compile
really big programs without hitting a code generation bug in that
platform (AIX). I compiled a Database code in C++ and the only compiler
that compiled all the code was IBM's. Maybe under linux gcc is
better. In any case it can probably compile the kernel without
getting into a bug.

Not probably, definitely. The Linux kernel is fully supported on
PowerPC.
and MIPS,

MIPS I do not know. Probably gcc is good enough for that
platform.

just to name a

I think you named all, or almost all.

On the contrary, I barely scratched the surface. It is possible to run
Linux on pretty much anything that has a CPU, like embedded systems,
mobile phones, game consoles and mainframes.

Anyway, I think we should stop here. After all this isn't comp.os.linux.
 
K

Keith Thompson

Angel said:
Le 17/05/11 22:51, Angel a ?crit : [...]
Only if you actually run Linux on Intel. Linux isn't bound to a single
platform and will also run on Sparc,

Sun compilers are the best there

I'm talking about Linux on Sparc, not about Sun Solaris.

Oracle Studio (formerly Sun Studio, the bundle that includes
Sun^H^H^HOracle's compiler) is available for Linux/x86. I have no
information about its relative quality.
 
M

Mickey Mouse

Le 17/05/11 22:43, Mickey Mouse a écrit :

Well that was more than one and half years ago, and as you say, Intel
removed that...

What else has/could intel do that is more subtle? With gcc you know
what you are getting.
 
R

Ralph Spitzner

August said:
Clang give excellent error messages. For example, try to compile this
program with gcc and then with clang and see for yourself:

struct t {
int n;
}

int main(void)
{
return 0;
}


/August


Well, gcc tels you you're missing something _before_
the declaration of main.
For which I don't need a compiler because it's clear to see
what's wrong.

struct somename { sometype somename; ); [semicolon here]

So perhaps actually _reading_ books was worth it :p

-rasp
 
N

Nomen Nescio

Angel said:
Only if you actually run Linux on Intel. Linux isn't bound to a single
platform and will also run on Sparc, PowerPC and MIPS, just to name a
few.

For my purpose Jacob's post was helpful. I should have said I am asking
about Linux on Intel, you are right, Linux has spread to many
platforms. Thanks to you both.
The best general purpose compiler for Linux and most other Unixes is
still gcc, IMHO. The kernel and most libraries are made with gcc, so it
is the most compatible, and it is available for free on pretty much
every platform imaginable.

I am not saying gcc doesn't make life easy on Linux but I personally don't
like it so I am looking for an alternative. I'm sure if I was a Linux
developer I would use gcc like all the other Linux developers. I want to
develop on Linux but I don't ever want to be a Linux developer.
 
A

Angel

For my purpose Jacob's post was helpful. I should have said I am asking
about Linux on Intel, you are right, Linux has spread to many
platforms. Thanks to you both.

You're quite welcome. Of course, if you write your programs in such a
way that only Intel's compiler can compile them you will lose
portability, but it is up to you to decide if that is an issue or not.
I am not saying gcc doesn't make life easy on Linux but I personally don't
like it so I am looking for an alternative. I'm sure if I was a Linux
developer I would use gcc like all the other Linux developers. I want to
develop on Linux but I don't ever want to be a Linux developer.

Well, I just wanted to put my $0.02 in and point out the merits of gcc, but
my personal philosophy has always been "use whatever works right for you".
I am a bit of a Linux enthousiast and an scratching the surface of kernel
programming, but I refuse to take part in the holy wars on which OS, distro,
editor or compiler is best.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top