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:28:05 +0100
User-agent: Mozilla/5.0 (X11; NetBSD i386; rv:17.0) Gecko/20130221 Thunderbird/17.0.2

Hi,

On 03/03/13 13:17, Richard Frith-Macdonald wrote:
My take on the relative merits is:

The advantages of gcc are that it's the de-facto standard (you generally don't 
have to install it, let alone build it yourself), is much more portable/ported 
(reliable on many more platforms), and has most of the good things that Apple 
has added to objc, and less of the the bloat such as 'blocks'.
+1 ! If yo udon't use something, why do you need support for it?

but clang has two really nice things going for it:
1. the static analyser can spot quite a few coding errors, and that's great
2. clang has ARC support, which is really cool

Since I generally want high portability, I stick with code that builds in gcc, 
but I do use clang for the static analyser.

Yes, the static analyser is great! It has helped to find some weird errors in GAP applications ad even GWorkspace! However, it sometimes gives false positive which are quite bad, so it is a great tool, but not something to rely blindly on. I also had code working on Clang and not GCC: the code was wrong, but GCC optimized moer I guess so the memory error was caught (the latest Example about this was in Gorm) The best in my opinion to write code that works on both compiler, check warnings on both, test on both and the result is stronger code.
I hope both will remain alive, since I like choice and diversity of tools.

Riccardo



reply via email to

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