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

Tim Prince tprince@myrealbox.com
Tue Apr 3 21:17:00 GMT 2007


John Love-Jensen wrote:
> 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
>
>
>   
For Fortran, unequivocally, 4.1.2 should be your choice, unless you are 
trying to use outdated commercial products which aren't compatible with 
gcc-4.1.  In that case, you can still keep your old installation, 
building and installing the new one in another tree.  This also caters 
to those applications which don't like the stricter standards of gcc/g++ 
4.1.



More information about the Gcc-help mailing list