Re: What is the preferred GCC version 3.x or 4.x

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

 



Hi Warren,

I recommend going to GCC 4.1.2, which as of this moment is the current
release.

Unless you have mitigating circumstances, such as "using Xcode" or "running
on a platform that is no longer supports my CPU in GCC 4.x".

If you are doing C, then I don't know of any reason not to jump to GCC
4.1.2.

If you are doing C++, there here's my informal recollection of the most
frequent issues expressed on this forum...

The biggest "gotchya" I've heard from people between 3.x and 4.x has been
that GCC 4.x is compliant with the ISO 14882 requirement for specifying the
"typename" keyword when trying to refer to a type in a parent class, in the
context of a template definition.

The second biggest "gotchya" I've heard is the compiler no longer allows
unqualified access to a parent data member, in the context of a template
definition (have to access via one of:  using Base<T>::x; --or-- this->x
--or-- Base<T>::x ).

The third biggest "gotchya" I've heard is people having problems dealing
with mixed / mismatched libraries compiled with different versions.  The
response is something about the later compiler and later library being
backwards compatible; but earlier C++ compiler and earlier C++ library may
not necessarily be forwards compatible.  (I probably phrased that either
confusingly, or incorrectly.  Must be time to go home.)

And, finally (the catch-all miscellaneous "gotchyas"), GCC 4.x has tried to
become more ISO 14882 compliant all around.  And several deprecated (for
quite some time) features of GCC have been (finally) removed, which some
folks' code relied upon, and generated some "What the fudge...?!!!" ire.

I also presume there may have been some C++ ABI changes (but I'm not sure),
which can lead to problems for the unwary.

If you are using some other language -- Java, Ada, D Programming Language,
LISP, Fortran, Objective-C, Objective-C++, Chill, Pascal, AppleSoft BASIC --
then I'm not sure.

HTH,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux