discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: clang vs gcc 4.7


From: Riccardo Mottola
Subject: Re: clang vs gcc 4.7
Date: Sun, 03 Mar 2013 13:21:33 +0100
User-agent: Mozilla/5.0 (X11; NetBSD i386; rv:17.0) Gecko/20130221 Thunderbird/17.0.2

Hi,

On 03/03/13 12:51, Tom Davie wrote:
Clang runs faster in -O0 mode.
Clang produces faster code in -O3/-Os mode (especially for objc).
Clang produces better error messages.
Clang will be updated in the future with all of apple's changes to objective-c.
Clang is more friendlily licensed (not that I want to start a flamewar, and I 
realise this argument may not be strong on this particular list).
Clang's codebase is easier to work on.
Clang supports being used as a library, and hence can have other tools (e.g. 
google's refactored, or the static and (in early development) dynamic 
analysers) built upon it.
Clang's C++ support is better than gcc's.
This argument is a bit moot for one may not need or event want C++. I did an attempt to build a while system without C++ at all! (sadly, latest gcc versions are free to use C++ too). For my gnustep environment, the only little thing that needs it is xpdf for PDFKit, all the remaining applications and dependencies are pure C and Obj-C!

The average use doesn't poke inside the compiler, the compiler is a system provided tool. So working on its innards is not a plus.

Since Etoilé people are also the clang people, they rely on it. But most other GNUstep applications, including all core, user apps and all GAP applications, work perfectly with gcc 4.x and most of them even with 3.x Gcc is reliable for the needs I have, works fine, although its obj-c compiler is not very fast. What will happen about obj-c in gcc I don't know, Nicola may know better, since he worked on a great deal on it.

Clang has given me tons of headaches, but it was the only thing working on x86-64 linux gentoo for me. David Chisnall however did a lot of great work and everything is now much improved. On my development machines, I have some with clang and some with gcc and I see no advantages or disadvantages of one compared to the other, in the applications I work in.

Riccardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]