[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.c

What good C compilers are available for Linux/UNIX?

Cookie

5/17/2011 5:36:00 PM

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).

15 Answers

Seebs

5/17/2011 6:33:00 PM

0

On 2011-05-17, Fritz Wuehler <fritz@spamexpire-201105.rodent.frell.theremailer.net> wrote:
> 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
--
Copyright 2011, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net
http://www.seeb... <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/...(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.

William Ahern

5/17/2011 6:51:00 PM

0

Fritz Wuehler <fritz@spamexpire-201105.rodent.frell.theremailer.net> wrote:
> 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).

http://clang...
http://www.comeaucomp...
http://pcc.lu...
http://bellar...

PCC claims full C99 conformance, perhaps excluding those parts which are the
purview of the library. clang is now the default compiler on OS X. As for
intelligent presentation of options... you'd have to judge yourself.

TinyCC is interesting for it's runtime bounds checking mode.

I've never used Comeau Computing's compiler.

August Karlstrom

5/17/2011 7:19:00 PM

0

On 2011-05-17 20:50, William Ahern wrote:
> Fritz Wuehler<fritz@spamexpire-201105.rodent.frell.theremailer.net> wrote:
>> 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).
>
> http://clang...
> http://www.comeaucomp...
> http://pcc.lu...
> http://bellar...
>
> PCC claims full C99 conformance, perhaps excluding those parts which are the
> purview of the library. clang is now the default compiler on OS X.

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

--
The competent programmer is fully aware of the limited size of his own
skull. He therefore approaches his task with full humility, and avoids
clever tricks like the plague. --Edsger Dijkstra

jacob navia

5/17/2011 7:36:00 PM

0

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

phrogg

5/17/2011 8:43:00 PM

0

On Tue, 17 May 2011 21:35:30 +0200, jacob navia <jacob@spamsink.net>
wrote:

>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.

http://www.osnews.com/story/22683/Intel_Forced_to_Remove_Cripple_AMD_Function_from...

Angel

5/17/2011 8:51:00 PM

0

On 2011-05-17, jacob navia <jacob@spamsink.net> wrote:
>
> 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.


--
"C provides a programmer with more than enough rope to hang himself.
C++ provides a firing squad, blindfold and last cigarette."
- seen in comp.lang.c

jacob navia

5/17/2011 8:59:00 PM

0

Le 17/05/11 22:43, Mickey Mouse a écrit :
> On Tue, 17 May 2011 21:35:30 +0200, jacob navia<jacob@spamsink.net>
> wrote:
>
>> 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.
>
> http://www.osnews.com/story/22683/Intel_Forced_to_Remove_Cripple_AMD_Function_from...

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


jacob navia

5/17/2011 9:04:00 PM

0

Le 17/05/11 22:51, Angel a écrit :
> On 2011-05-17, jacob navia<jacob@spamsink.net> wrote:
>>
>> 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,

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
> few.
>

I think you named all, or almost all.


Angel

5/17/2011 9:15:00 PM

0

On 2011-05-17, jacob navia <jacob@spamsink.net> wrote:
> Le 17/05/11 22:51, Angel a ?crit :
>> On 2011-05-17, jacob navia<jacob@spamsink.net> wrote:
>>>
>>> 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,
>
> 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
>> few.
>>
>
> 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.


--
"C provides a programmer with more than enough rope to hang himself.
C++ provides a firing squad, blindfold and last cigarette."
- seen in comp.lang.c

Keith Thompson

5/17/2011 9:56:00 PM

0

Angel <angel+news@spamcop.net> writes:
> On 2011-05-17, jacob navia <jacob@spamsink.net> wrote:
>> 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.

--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.ne...
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"