Projects / gcc / Comments

Comments for gcc

06 Mar 2011 11:12 brudaz

is still better than Clang/LLVM?

08 Oct 2009 12:01 gwr3n

How does the gcc java compiler differ from the standard javac provided with the JDK?

<a href="http://sites.google.com/site/robros/">Roberto Rossi</a>

05 Sep 2009 20:05 labney

My experience is that Ada has the most helpful and easily understood error messages. Its strong typing helps to keep you out of trouble. C++ on the other hand gives you plenty of rope to hang yourself with.

26 Jan 2008 05:34 sigra

Statement about providing source code checking is a truth with modifications
>GCC provides many levels of source code error
checking traditionally provided by other tools (such as
lint)

This is unfortunately a truth with modifications. It may be
true for some frontends, such as Ada, but definitely not
for C/C++.

The Ada frontend (GNAT) is very helpful. If an identifier is
typed wrong, GNAT suggests the correct name. If a
variable is not modified, GNAT can suggest declaring it as
a constant. (This feature has helped me catch some
errors that would have taken me significantly longer time
to find the hard way, for example when I intended to
modify a variable and then forgot to write the statement
to do it.) If one forgets a semicolon, GNAT says
missing ';'. (If you ever tried to use g++ you sure know
that it usually spews out 20 pages of obscure error
messages in this case.) GNAT reports the location of
errors with both line number and column number (g++
only reports line number). GNAT can even warn about
style errors, such as wrong indentation, padding or
overlong lines.

But GCC does not intend to be that helpful for C++
developers. If a wish for such a feature is requested, it is
usually rejected within half an hour or so. This is the case
for warning
about variables that could be declared constant.
The motivation was: "Isn't this a task for lint-like tool?
GCC isn't such thing." (Note how that statement directly
contradicts what the freshmeat summary says?)

The whole Ada language is designed to catch errors as
early as possible. Preferably at compile time. If that is not
possible, they should be caught as early as possible at
runtime. A common error is to dereference null pointers.
C++ is not designed for correctness but I still believe
that some things can be done to remedy the situation,
like optionally warning about dereferencing pointers
without checking for null. But that feature
request went
the same way.

So maybe the GCC develpers think that just because
someone chose to develop in C/C++ they couldn't care
less about code correctness. That may be true of course,
but they forgot that not all who do so actually chose it.
They might have to work on existing code written in a
language chosen by someone else.

Maybe the GCC develoers just want to keep a huge
advantage of Ada over C/C++ by not even allowing
people register wishes for code checking features in the
C/C++ frontends? But I plead them to reconsider this.
And I can assure them that even if a few little helpful
checks are added to C/C++, it will not become Ada.
There will still be a huge advantage.

10 Feb 2007 14:46 gmfpanda

Re: Comparisons issue

> The new C++ ABI in the GCC 3.0 series
> uses address comparisons, rather than
> string compares, to determine type
> equality.


And I much prefer this over old string compares.

24 Dec 2006 02:42 Theimprover

Comparisons issue
The new C++ ABI in the GCC 3.0 series uses address comparisons, rather than string compares, to determine type equality.

17 Dec 2006 10:17 mikaelt

Re: GCC


> You are probably wrong. Independent

> analysis has shown it's quiet same in

> performance as earlier version. GCC 4.0

> has not been optimized for speed yet.

That's right, but now with the 4.1 things are much better. 4.1 should be several percentages faster than 4.0.

25 Oct 2005 17:36 Pfv2

Re: missing version...
4.0 is out now ;)

19 May 2005 01:32 contusion

Re: GCC


> A lot of compilers have come and gone

> over the last years but GCC has been one

> of the leading compilers in use over the

> last 15 years. It has a long and

> critically important history in the free

> and open source movement. GCC version 4

> now features a new optimization

> framework (Tree-SSA) and includes

> improvements to its optimizer (e.g. dead

> code elimination, autovectorisation of

> loops) as well as language-specific

> improvements. The changelog states:

> "Independent testers have measured

> speed-ups up to 25% in real-world

> production code, compared to the 3.4

> family" (for C++). Tree-SSA will enable

> the development of many more

> optimizations than were reasonably

> possible with the old infrastructure -

> so GCC 4.0 is the base of the next round

> of optimization, which will be part of

> GCC 4.1. Tom

You are probably wrong. Independent analysis has shown it's quiet same in performance as earlier version. GCC 4.0 has not been optimized for speed yet.

02 May 2005 11:24 fersten

GCC
A lot of compilers have come and gone over the last years but GCC has been one of the leading compilers in use over the last 15 years. It has a long and critically important history in the free and open source movement. GCC version 4 now features a new optimization framework (Tree-SSA) and includes improvements to its optimizer (e.g. dead code elimination, autovectorisation of loops) as well as language-specific improvements. The changelog (http://gcc.gnu.org/gcc-4.0/changes.html) states: "Independent testers have measured speed-ups up to 25% in real-world production code, compared to the 3.4 family" (for C++). Tree-SSA will enable the development of many more optimizations than were reasonably possible with the old infrastructure - so GCC 4.0 is the base of the next round of optimization, which will be part of GCC 4.1. Tom (http://www.very-clever.com/)

Screenshot

Project Spotlight

ReciJournal

An open, cross-platform journaling program.

Screenshot

Project Spotlight

Veusz

A scientific plotting package.