This file contains information about GCC releases which has been generated automatically from the online release notes. It covers releases of GCC (and the former EGCS project) since EGCS 1.0, on the line of development that led to GCC 3. For information on GCC 2.8.1 and older releases of GCC 2, see ONEWS. ====================================================================== http://gcc.gnu.org/gcc-4.0/index.html GCC 4.0 Release Series April 20, 2005 The [1]GNU project and the GCC developers are pleased to announce the release of GCC 4.0.0. Release History GCC 4.0.0 April 20, 2005 ([2]changes) References and Acknowledgements GCC used to stand for the GNU C Compiler, but since the compiler supports several other languages aside from C, it now stands for the GNU Compiler Collection. A list of [3]successful builds is updated as new information becomes available. The GCC developers would like to thank the numerous people that have contributed new features, improvements, bug fixes, and other changes as well as test results to GCC. This [4]amazing group of volunteers is what makes GCC successful. For additional information about GCC please refer to the [5]GCC project web site or contact the [6]GCC development mailing list. To obtain GCC please use [7]our mirror sites, one of the [8]GNU mirror sites, or [9]our CVS server. _________________________________________________________________ Please send FSF & GNU inquiries & questions to [10]gnu@gnu.org. There are also [11]other ways to contact the FSF. These pages are maintained by [12]the GCC team. For questions related to the use of GCC, please consult these web pages and the [13]GCC manuals. If that fails, the [14]gcc-help@gcc.gnu.org mailing list might help. Please send comments on these web pages and the development of GCC to our developer mailing list at [15]gcc@gnu.org or [16]gcc@gcc.gnu.org. All of our lists have [17]public archives. Copyright (C) Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. Last modified 2005-04-21 [18]Valid XHTML 1.0 References 1. http://www.gnu.org/ 2. http://gcc.gnu.org/gcc-4.0/changes.html 3. http://gcc.gnu.org/gcc-4.0/buildstat.html 4. http://gcc.gnu.org/onlinedocs/gcc/Contributors.html 5. http://gcc.gnu.org/index.html 6. mailto:gcc@gcc.gnu.org 7. http://gcc.gnu.org/mirrors.html 8. http://www.gnu.org/order/ftp.html 9. http://gcc.gnu.org/cvs.html 10. mailto:gnu@gnu.org 11. http://www.gnu.org/home.html#ContactInfo 12. http://gcc.gnu.org/about.html 13. http://gcc.gnu.org/onlinedocs/ 14. mailto:gcc-help@gcc.gnu.org 15. mailto:gcc@gnu.org 16. mailto:gcc@gcc.gnu.org 17. http://gcc.gnu.org/lists.html 18. http://validator.w3.org/check/referer ====================================================================== http://gcc.gnu.org/gcc-4.0/changes.html GCC 4.0 Release Series Changes, New Features, and Fixes Caveats * GCC now generates location lists by default when compiling with debug info and optimization. + GDB 6.0 and older crashes when it sees location lists. GDB 6.1 or later is needed to debug binaries containing location lists. + When you are trying to view a value of a variable in a part of a function where it has no location (for example when the variable is no longer used and thus its location was used for something else) GDB will say that it is not available. You can disable generating location lists by -fno-var-tracking. * GCC no longer accepts the -fwritable-strings option. Use named character arrays when you need a writable string. * The options -freduce-all-givs and -fmove-all-movables have been discontinued. They were used to circumvent a shortcoming in the heuristics of the old loop optimization code with respect to common Fortran constructs. The new (tree) loop optimizer works differently and doesn't need those work-arounds. * The graph-coloring register allocator, formerly enabled by the option -fnew-ra, has been discontinued. * -I- has been deprecated. -iquote is meant to replace the need for this option. * The MIPS -membedded-pic and -mrnames options have been removed. * All MIPS targets now require the GNU assembler. In particular, IRIX configurations can no longer use the MIPSpro assemblers, although they do still support the MIPSpro linkers. * The SPARC option -mflat has been removed. * English-language diagnostic messages will now use Unicode quotation marks in UTF-8 locales. (Non-English messages already used the quotes appropriate for the language in previous releases.) If your terminal does not support UTF-8 but you are using a UTF-8 locale (such locales are the default on many GNU/Linux systems) then you should set LC_CTYPE=C in the environment to disable that locale. Programs that parse diagnostics and expect plain ASCII English-language messages should set LC_ALL=C. See [1]Markus Kuhn's explanation of Unicode quotation marks for more information. * The specs file is no longer installed on most platforms. Most users will be totally unaffected. However, if you are accustomed to editing the specs file yourself, you will now have to use the -dumpspecs option to generate the specs file, and then edit the resulting file. General Optimizer Improvements * The [2]tree ssa branch has been merged. This merge has brought in a completely new optimization framework based on a higher level intermediate representation than the existing RTL representation. Numerous new code transformations based on the new framework are available in GCC 4.0, including: + Scalar replacement of aggregates + Constant propagation + Value range propagation + Partial redundancy elimination + Load and store motion + Strength reduction + Dead store elimination + Dead and unreachable code elimination + [3]Autovectorization + Loop interchange + Tail recursion by accumulation Many of these passes outperform their counterparts from previous GCC releases. * [4]Swing Modulo Scheduling (SMS). An RTL level instruction scheduling optimization intended for loops that perform heavy computations. New Languages and Language specific improvements C family * The sentinel attribute has been added to GCC. This function attribute allows GCC to warn when variadic functions such as execl are not NULL terminated. See the GCC manual for a complete description of its behavior. * Given __attribute__((alias("target"))) it is now an error if target is not a symbol, defined in the same translation unit. This also applies to aliases created by #pragma weak alias=target. This is because it's meaningless to define an alias to an undefined symbol. On Solaris, the native assembler would have caught this error, but GNU as does not. C and Objective-C * The -Wstrict-aliasing=2 option has been added. This warning catches all unsafe cases, but it may also give a warning for some cases that are safe. * The cast-as-lvalue, conditional-expression-as-lvalue and compound-expression-as-lvalue extensions, which were deprecated in 3.3.4 and 3.4, have been removed. * The -fwritable-strings option, which was deprecated in 3.4, has been removed. * #pragma pack() semantics have been brought closer to those used by other compilers. This also applies to C++. * Taking the address of a variable with register storage is invalid in C. GCC now issues an error instead of a warning. * Arrays of incomplete element type are invalid in C. GCC now issues an error for such arrays. Declarations such as extern struct s x[]; (where struct s has not been defined) can be moved after the definition of struct s. Function parameters declared as arrays of incomplete type can instead be declared as pointers. C++ * When compiling without optimizations (-O0), the C++ frontend is much faster than in any previous versions of GCC. Independent testers have measured speed-ups up to 25% in real-world production code, compared to the 3.4 family (which was already the fastest version to date). Upgrading from older versions might show even bigger improvements. * ELF visibility attributes can now be applied to a class type, so that it affects every member function of a class at once, without having to specify each individually: class __attribute__ ((visibility("hidden"))) Foo { int foo1(); void foo2(); }; The syntax is deliberately similar to the __declspec() system used by Microsoft Windows based compilers, allowing cross-platform projects to easily reuse their existing macro system for denoting exports and imports. By explicitly marking internal classes never used outside a binary as hidden, one can completely avoid PLT indirection overheads during their usage by the compiler. You can find out more about the advantages of this at [5]http://people.redhat.com/drepper/dsohowto.pdf * The -fvisibility-inlines-hidden option has been added which marks all inlineable functions as having hidden ELF visibility, thus removing their symbol and typeinfo from the exported symbol table of the output ELF binary. Using this option can reduce the exported symbol count of template-heavy code by up to 40% with no code change at all, thus notably improving link and load times for the binary as well as a reduction in size of up to 10%. Also, check the new [6]-fvisibility option. * The compiler now uses the library interface specified by the [7]C++ ABI for thread-safe initialization of function-scope static variables. Most users should leave this alone, but embedded programmers may want to disable this by specifying -fno-threadsafe-statics for a small savings in code size. * Taking the address of an explicit register variable is no longer supported. Note that C++ allows taking the address of variables with register storage so this will continue to compile with a warning. For example, assuming that r0 is a machine register: register int foo asm ("r0"); register int bar; &foo; // error, no longer accepted &bar; // OK, with a warning * G++ has an undocumented extension to virtual function covariancy rules that allowed the overrider to return a type that was implicitly convertable to the overridden function's return type. For instance a function returning void * could be overridden by a function returning T *. This is now deprecated and will be removed in a future release. * The G++ minimum and maximum operators (?) and their compound forms (?=) have been deprecated and will be removed in a future version. Code using these operators should be modified to use std::min and std::max instead. * Declaration of nested classes of class templates as friends are supported: template struct A { class B {}; }; class C { template friend class A::B; }; This complements the feature member functions of class templates as friends introduced in GCC 3.4.0. * When declaring a friend class using an unqualified name, classes outside the innermost non-class scope are not searched: class A; namespace N { class B { friend class A; // Refer to N::A which has not been declared yet // because name outside namespace N are not searched friend class ::A; // Refer to ::A }; } Hiding the friend name until declaration is still not implemented. * Friends of classes defined outside their namespace are correctly handled: namespace N { class A; } class N::A { friend class B; // Refer to N::B in GCC 4.0.0 // but ::B in earlier versions of GCC }; Runtime Library (libstdc++) * Optimization work: + Added efficient specializations of istream functions for char and wchar_t. + Further performance tuning of strings, in particular wrt single-char append and getline. + iter_swap - and therefore most of the mutating algorithms - now makes an unqualified call to swap when the value_type of the two iterators is the same. * A large subset of the features in Technical Report 1 (TR1 for short) is experimentally delivered (i.e., no guarantees about the implementation are provided. In particular it is not promised that the library will remain link compatible when code using TR1 is used): + General utilities such as reference_wrapper and shared_ptr. + Function objects, i.e., result_of, mem_fn, bind, function. + Support for metaprogramming. + New containers such as tuple, array, unordered_set, unordered_map, unordered_multiset, unordered_multimap. * As usual, many bugs have been fixed and LWG resolutions implemented for the first time (e.g., DR 409). Java * In order to prevent naming conflicts with other implementations of these tools, some GCJ binaries have been renamed: + rmic is now grmic, + rmiregistry is now grmiregistry, and + jar is now fastjar. In particular, these names were problematic for the jpackage.org packaging conventions which install symlinks in /usr/bin that point to the preferred versions of these tools. * The -findirect-dispatch argument to the compiler now works and generates code following a new "binary compatibility" ABI. Code compiled this way follows the binary compatibility rules of the Java Language Specification. * libgcj now has support for using GCJ as a JIT, using the gnu.gcj.jit family of system properties. * libgcj can now find a shared library corresponding to the bytecode representation of a class. See the documentation for the new gcj-dbtool program, and the new gnu.gcj.precompiled.db.path system property. * There have been many improvements to the class library. Here are some highlights: + Much more of AWT and Swing exist. + Many new packages and classes were added, including java.util.regex, java.net.URI, javax.crypto, javax.crypto.interfaces, javax.crypto.spec, javax.net, javax.net.ssl, javax.security.auth, javax.security.auth.callback, javax.security.auth.login, javax.security.auth.x500, javax.security.sasl, org.ietf.jgss, javax.imageio, javax.imageio.event, javax.imageio.spi, javax.print, javax.print.attribute, javax.print.attribute.standard, javax.print.event, and javax.xml + Updated SAX and DOM, and imported GNU JAXP Fortran * A new [8]Fortran front end has replaced the aging GNU Fortran 77 front end. The new front end supports Fortran 90 and Fortran 95. It may not yet be as stable as the old Fortran front end. Ada * Ada (with tasking and Zero Cost Exceptions) is now available on many more targets, including but not limited to: alpha-linux, hppa-hpux, hppa-linux, powerpc-darwin, powerpc-linux, s390-linux, s390x-linux, sparc-linux. * Some of the new Ada 2005 features are now implemented like Wide_Wide_Character and Ada.Containers. * Many bugs have been fixed, tools and documentation improved. * To compile Ada from the sources, install an older working Ada compiler and then use --enable-languages=ada at configuration time, since the Ada frontend is not currently activated by default. See the [9]Installing GCC for details. New Targets and Target Specific Improvements H8/300 * The frame layout has changed. In the new layout, the prologue of a function first saves registers and then allocate space for locals, resulting in an 1% improvement on code size. IA-32/x86-64 (AMD64) * The acos, asin, drem, exp10, exp2, expm1, fmod, ilogb, log10, log1p, log2, logb and tan mathematical builtins (and their float and long double variants) are now implemented as inline x87 intrinsics when using -ffast-math. * The ceil, floor, nearbyint, rint and trunc mathematical builtins (and their float and long double variants) are now implemented as inline x87 intrinsics when using -ffast-math. * The x87's fsincos instruction is now used automatically with -ffast-math when calculating both the sin and cos of the same argument. * Instruction selection for multiplication and division by constants has been improved. IA-64 * Floating point division, integer division and sqrt are now inlined, resulting in significant performance improvements on some codes. MIPS * Division by zero checks now use conditional traps if the target processor supports them. This decreases code size by one word per division operation. The old behavior (branch and break) can be obtained either at configure time by passing --with-divide=breaks to configure or at runtime by passing -mdivide-breaks to GCC. * Support for MIPS64 paired-single instructions has been added. It is enabled by -mpaired-single and can be accessed using both the target-independent vector extensions and new MIPS-specific built-in functions. * Support for the MIPS-3D ASE has been added. It is enabled by -mips3d and provides new MIPS-3D-specific built-in functions. * The -mexplicit-relocs option now supports static n64 code (as is used, for example, in 64-bit linux kernels). -mexplicit-relocs should now be feature-complete and is enabled by default when GCC is configured to use a compatible assembler. * Support for the NEC VR4130 series has been added. This support includes the use of VR-specific instructions and a new VR4130 scheduler. Full VR4130 support can be selected with -march=vr4130 while code for any ISA can be tuned for the VR4130 using -mtune=vr4130. There is also a new -mvr4130-align option that produces better schedules at the cost of increased code size. * Support for the Broadcom SB-1 has been extended. There is now an SB-1 scheduler as well as support for the SB-1-specific paired-single instructions. Full SB-1 support can be selected with -march=sb1 while code for any ISA can be optimized for the SB-1 using -mtune=sb1. * The compiler can now work around errata in R4000, R4400, VR4120 and VR4130 processors. These workarounds are enabled by -mfix-r4000, -mfix-r4400, -mfix-vr4120 and -mfix-vr4130 respectively. The VR4120 and VR4130 workarounds need binutils 2.16 or above. * IRIX shared libraries are now installed into the standard library directories: o32 libraries go into lib/, n32 libraries go into lib32/ and n64 libraries go into lib64/. * The compiler supports a new -msym32 option. It can be used to optimize n64 code in which all symbols are known to have 32-bit values. S/390 and zSeries * New command line options help to generate code intended to run in an environment where stack space is restricted, e.g. Linux kernel code: + -mwarn-framesize and -mwarn-dynamicstack trigger compile-time warnings for single functions that require large or dynamic stack frames. + -mstack-size and -mstack-guard generate code that checks for stack overflow at run time. + -mpacked-stack generates code that reduces the stack frame size of many functions by reusing unneeded parts of the stack bias area. * The -msoft-float option now ensures that generated code never accesses floating point registers. * The s390x-ibm-tpf target now fully supports C++, including exceptions and threads. * Various changes to improve performance of the generated code have been implemented, including: + GCC now uses sibling calls where possible. + Condition code handling has been optimized, allowing GCC to omit redundant comparisons in certain cases. + The cost function guiding many optimizations has been refined to more accurately represent the z900 and z990 processors. + The ADD LOGICAL WITH CARRY and SUBTRACT LOGICAL WITH BORROW instructions are now used to avoid conditional branches in certain cases. + The back end now uses the LEGITIMIZE_RELOAD_ADDRESS feature to optimize address arithmetic required to access large stack frames. + GCC now makes more efficient use of memory-to-memory type instructions (MVC, CLC, ...). + More precise tracking of special register use allows better instruction scheduling, in particular of the function prologue and epilogue sequences. + The Java front end now generates inline code to implement integer division, instead of calling library routines. SPARC * The options -mv8, -msparclite, -mcypress, -msupersparc, -mf930 and -mf934 have been removed. They have been replaced with -mcpu=xxx. * The internal model used to estimate the relative cost of each instruction has been updated. It is expected to give better results on recent UltraSPARC processors. * Code generation for function prologues and epilogues has been improved, resulting in better scheduling and allowing multiple exit points in functions. * Support for Sun's Visual Instruction Set (VIS) has been enhanced. It is enabled by -mvis and provides new built-in functions for VIS instructions on UltraSPARC processors. NetWare * Novell NetWare (on ix86, no other hardware platform was ever really supported by this OS) has been re-enabled and the ABI supported by GCC has been brought into sync with that of MetroWerks CodeWarrior (the ABI previously supported was that of some Unix systems, which NetWare never tried to support). Obsolete Systems Support for a number of older systems has been declared obsolete in GCC 4.0. Unless there is activity to revive them, the next release of GCC will have their sources permanently removed. These individual systems have been obsoleted: * SPARC family + SPARClite-based systems (sparclite-*-coff, sparclite-*-elf, sparc86x-*-elf) + OpenBSD 32-bit (sparc-*-openbsd*) Documentation improvements Other significant improvements * Location lists are now generated by default when compiling with debug info and optimization. Location lists provide more accurate debug info about locations of variables and they allow debugging code compiled with -fomit-frame-pointer. * The -fvisibility option has been added which allows the default ELF visibility of all symbols to be set per compilation and the new #pragma GCC visibility preprocessor command allows the setting of default ELF visibility for a region of code. Using -fvisibility=hidden especially in combination with the new -fvisibility-inlines-hidden can yield substantial improvements in output binary quality including avoiding PLT indirection overheads, reduction of the exported symbol count by up to 60% (with resultant improvements to link and load times), better scope for the optimizer to improve code and up to a 20% reduction in binary size. Using these options correctly yields a binary with a similar symbol count to a Windows DLL. Perhaps more importantly, this new feature finally allows (with careful planning) complete avoidance of symbol clashes when manually loading shared objects with RTLD_GLOBAL, thus finally solving problems many projects such as python were forced to use RTLD_LOCAL for (with its resulting issues for C++ correctness). You can find more information about using these options at [10]http://gcc.gnu.org/wiki/Visibility. _________________________________________________________________ Please send FSF & GNU inquiries & questions to [11]gnu@gnu.org. There are also [12]other ways to contact the FSF. These pages are maintained by [13]the GCC team. For questions related to the use of GCC, please consult these web pages and the [14]GCC manuals. If that fails, the [15]gcc-help@gcc.gnu.org mailing list might help. Please send comments on these web pages and the development of GCC to our developer mailing list at [16]gcc@gnu.org or [17]gcc@gcc.gnu.org. All of our lists have [18]public archives. Copyright (C) Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. Last modified 2005-04-16 [19]Valid XHTML 1.0 References 1. http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html 2. http://gcc.gnu.org/projects/tree-ssa/ 3. http://gcc.gnu.org/projects/tree-ssa/vectorization.html 4. http://gcc.gnu.org/news/sms.html 5. http://people.redhat.com/drepper/dsohowto.pdf 6. http://gcc.gnu.org/gcc-4.0/changes.html#visibility 7. http://www.codesourcery.com/cxx-abi/ 8. http://gcc.gnu.org/fortran/ 9. http://gcc.gnu.org/install/ 10. http://gcc.gnu.org/wiki/Visibility 11. mailto:gnu@gnu.org 12. http://www.gnu.org/home.html#ContactInfo 13. http://gcc.gnu.org/about.html 14. http://gcc.gnu.org/onlinedocs/ 15. mailto:gcc-help@gcc.gnu.org 16. mailto:gcc@gnu.org 17. mailto:gcc@gcc.gnu.org 18. http://gcc.gnu.org/lists.html 19. http://validator.w3.org/check/referer ====================================================================== http://gcc.gnu.org/gcc-3.4/index.html GCC 3.4 Release Series November 4, 2004 The [1]GNU project and the GCC developers are pleased to announce the release of GCC 3.4.3. This release is a bug-fix release, containing fixes for regressions in GCC 3.4.2 relative to previous releases of GCC. September 6, 2004 The [2]GNU project and the GCC developers are pleased to announce the release of GCC 3.4.2. This release is a bug-fix release, containing fixes for regressions in GCC 3.4.1 relative to previous releases of GCC. July 1, 2004 The [3]GNU project and the GCC developers are pleased to announce the release of GCC 3.4.1. This release is a bug-fix release, containing fixes for regressions in GCC 3.4.0 relative to previous releases of GCC. April 18, 2004 The [4]GNU project and the GCC developers are pleased to announce the release of GCC 3.4.0. The GCC 3.4 release series includes numerous [5]new features, improvements, bug fixes, and other changes, thanks to an [6]amazing group of volunteers. Release History GCC 3.4.3 November 4, 2004 ([7]changes) GCC 3.4.2 September 6, 2004 ([8]changes) GCC 3.4.1 July 1, 2004 ([9]changes) GCC 3.4.0 April 18, 2004 ([10]changes) References and Acknowledgements GCC used to stand for the GNU C Compiler, but since the compiler supports several other languages aside from C, it now stands for the GNU Compiler Collection. A list of [11]successful builds is updated as new information becomes available. The GCC developers would like to thank the numerous people that have contributed new features, improvements, bug fixes, and other changes as well as test results to GCC. This [12]amazing group of volunteers is what makes GCC successful. For additional information about GCC please refer to the [13]GCC project web site or contact the [14]GCC development mailing list. To obtain GCC please use [15]our mirror sites, one of the [16]GNU mirror sites, or [17]our CVS server. _________________________________________________________________ Please send FSF & GNU inquiries & questions to [18]gnu@gnu.org. There are also [19]other ways to contact the FSF. These pages are maintained by [20]the GCC team. For questions related to the use of GCC, please consult these web pages and the [21]GCC manuals. If that fails, the [22]gcc-help@gcc.gnu.org mailing list might help. Please send comments on these web pages and the development of GCC to our developer mailing list at [23]gcc@gnu.org or [24]gcc@gcc.gnu.org. All of our lists have [25]public archives. Copyright (C) Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. Last modified 2004-11-14 [26]Valid XHTML 1.0 References 1. http://www.gnu.org/ 2. http://www.gnu.org/ 3. http://www.gnu.org/ 4. http://www.gnu.org/ 5. http://gcc.gnu.org/gcc-3.4/changes.html 6. http://gcc.gnu.org/onlinedocs/gcc/Contributors.html 7. http://gcc.gnu.org/gcc-3.4/changes.html#3.4.3 8. http://gcc.gnu.org/gcc-3.4/changes.html#3.4.2 9. http://gcc.gnu.org/gcc-3.4/changes.html#3.4.1 10. http://gcc.gnu.org/gcc-3.4/changes.html 11. http://gcc.gnu.org/gcc-3.4/buildstat.html 12. http://gcc.gnu.org/onlinedocs/gcc/Contributors.html 13. http://gcc.gnu.org/index.html 14. mailto:gcc@gcc.gnu.org 15. http://gcc.gnu.org/mirrors.html 16. http://www.gnu.org/order/ftp.html 17. http://gcc.gnu.org/cvs.html 18. mailto:gnu@gnu.org 19. http://www.gnu.org/home.html#ContactInfo 20. http://gcc.gnu.org/about.html 21. http://gcc.gnu.org/onlinedocs/ 22. mailto:gcc-help@gcc.gnu.org 23. mailto:gcc@gnu.org 24. mailto:gcc@gcc.gnu.org 25. http://gcc.gnu.org/lists.html 26. http://validator.w3.org/check/referer ====================================================================== http://gcc.gnu.org/gcc-3.4/changes.html GCC 3.4 Release Series Changes, New Features, and Fixes The latest release in the 3.4 release series is [1]GCC 3.4.3. GCC 3.4 has [2]many improvements in the C++ frontend. Before reporting a bug, please make sure it's really GCC, and not your code, that is broken. Caveats * GNU Make is now required to build GCC. * With -nostdinc the preprocessor used to ignore both standard include paths and include paths contained in environment variables. It was neither documented nor intended that environment variable paths be ignored, so this has been corrected. * GCC no longer accepts the options -fvolatile, -fvolatile-global and -fvolatile-static. It is unlikely that they worked correctly in any 3.x release. * GCC no longer ships . Use instead. * Support for all the systems [3]obsoleted in GCC 3.3 has been removed from GCC 3.4. See below for a [4]list of systems which are obsoleted in this release. * GCC now requires an ISO C90 (ANSI C89) C compiler to build. K&R C compilers will not work. * The implementation of the [5]MIPS ABIs has changed. As a result, the code generated for certain MIPS targets will not be binary compatible with earlier releases. * In previous releases, the MIPS port had a fake "hilo" register with the user-visible name accum. This register has been removed. * The implementation of the [6]SPARC ABIs has changed. As a result, the code generated will not be binary compatible with earlier releases in certain cases. * The configure option --enable-threads=pthreads has been removed; use --enable-threads=posix instead, which should have the same effect. * Code size estimates used by inlining heuristics for C, Objective-C, C++ and Java have been redesigned significantly. As a result the parameters of -finline-insns, --param max-inline-insns-single and --param max-inline-insns-auto need to be reconsidered. * --param max-inline-slope and --param min-inline-insns have been removed; they are not needed for the new bottom-up inlining heuristics. * The new unit-at-a-time compilation scheme has several compatibility issues: + The order in which functions, variables, and top-level asm statements are emitted may have changed. Code relying on some particular ordering needs to be updated. The majority of such top-level asm statements can be replaced by section attributes. + Unreferenced static variables and functions are removed. This may result in undefined references when an asm statement refers to the variable/function directly. In that case either the variable/function shall be listed in asm statement operand or in the case of top-level asm statements the attribute used shall be used to force function/variable to be always output and considered as a possibly used by unknown code. For variables the attribute is accepted only by GCC 3.4 and newer, while for earlier versions it is sufficient to use unused to silence warnings about the variables not being referenced. To keep code portable across different GCC versions, you can use appropriate preprocessor conditionals. + Static functions now can use non-standard passing conventions that may break asm statements calling functions directly. Again the attribute used shall be used to prevent this behavior. As a temporary workaround, -fno-unit-at-a-time can be used, but this scheme may not be supported by future releases of GCC. * GCC 3.4 automatically places zero-initialized variables in the .bss section on some operating systems. Versions of GNU Emacs up to (and including) 21.3 will not work correctly when using this optimization; you can use -fno-zero-initialized-in-bss to disable it. * If GCC 3.4 is configured with --enable-threads=posix (the default on most targets that support pthreads) then _REENTRANT will be defined unconditionally by some libstdc++ headers. C++ code which relies on that macro to detect whether multi-threaded code is being compiled might change in meaning, possibly resulting in linker errors for single-threaded programs. Affected users of [7]Boost should compile single-threaded code with -DBOOST_DISABLE_THREADS. See Bugzilla for [8]more information. General Optimizer Improvements * Usability of the profile feedback and coverage testing has been improved. + Performance of profiled programs has been improved by faster profile merging code. + Better use of the profile feedback for optimization (loop unrolling and loop peeling). + File locking support allowing fork() calls and parallel runs of profiled programs. + Coverage file format has been redesigned. + gcov coverage tool has been improved. + make profiledbootstrap available to build a faster compiler. Experiments made on i386 hardware showed an 11% speedup on -O0 and a 7.5% speedup on -O2 compilation of a [9]large C++ testcase. + New value profiling pass enabled via -fprofile-values + New value profile transformations pass enabled via -fvpt aims to optimize some code sequences by exploiting knowledge about value ranges or other properties of the operands. At the moment a conversion of expensive divisions into cheaper operations has been implemented. + New -fprofile-generate and -fprofile-use command line options to simplify the use of profile feedback. * A new unit-at-a-time compilation scheme for C, Objective-C, C++ and Java which is enabled via -funit-at-a-time (and implied by -O2). In this scheme a whole file is parsed first and optimized later. The following basic inter-procedural optimizations are implemented: + Removal of unreachable functions and variables + Discovery of local functions (functions with static linkage whose address is never taken) + On i386, these local functions use register parameter passing conventions. + Reordering of functions in topological order of the call graph to enable better propagation of optimizing hints (such as the stack alignments needed by functions) in the back end. + Call graph based out-of-order inlining heuristics which allows to limit overall compilation unit growth (--param inline-unit-growth). Overall, the unit-at-a-time scheme produces a 1.3% improvement for the SPECint2000 benchmark on the i386 architecture (AMD Athlon CPU). * More realistic code size estimates used by inlining for C, Objective-C, C++ and Java. The growth of large functions can now be limited via --param large-function-insns and --param large-function-growth. * A new cfg-level loop optimizer pass replaces the old loop unrolling pass and adds two other loop transformations -- loop peeling and loop unswitching -- and also uses the profile feedback to limit code growth. (The three optimizations are enabled by -funroll-loops, -fpeel-loops and -funswitch-loops flags, respectively). The old loop unroller still can be enabled by -fold-unroll-loops and may produce better code in some cases, especially when the webizer optimization pass is not run. * A new web construction pass enabled via -fweb (and implied by -O3) improves the quality of register allocation, CSE, first scheduling pass and some other optimization passes by avoiding re-use of pseudo registers with non-overlapping live ranges. The pass almost always improves code quality but does make debugging difficult and thus is not enabled by default by -O2 The pass is especially effective as cleanup after code duplication passes, such as the loop unroller or the tracer. * Experimental implementations of superblock or trace scheduling in the second scheduling pass can be enabled via -fsched2-use-superblocks and -fsched2-use-traces, respectively. New Languages and Language specific improvements Ada * The Ada front end has been updated to include numerous bug fixes and enhancements. These include: + Improved project file support + Additional set of warnings about potential wrong code + Improved error messages + Improved code generation + Improved cross reference information + Improved inlining + Better run-time check elimination + Better error recovery + More efficient implementation of unbounded strings + Added features in GNAT.Sockets, GNAT.OS_Lib, GNAT.Debug_Pools, ... + New GNAT.xxxx packages (e.g. GNAT.Strings, GNAT.Exception_Action) + New pragmas + New -gnatS switch replacing gnatpsta + Implementation of new Ada features (in particular limited with, limited aggregates) C/Objective-C/C++ * Precompiled headers are now supported. Precompiled headers can dramatically speed up compilation of some projects. There are some known defects in the current precompiled header implementation that will result in compiler crashes in relatively rare situations. Therefore, precompiled headers should be considered a "technology preview" in this release. Read the manual for details about how to use precompiled headers. * File handling in the preprocessor has been rewritten. GCC no longer gets confused by symlinks and hardlinks, and now has a correct implementation of #import and #pragma once. These two directives have therefore been un-deprecated. * The undocumented extension that allowed C programs to have a label at the end of a compound statement, which has been deprecated since GCC 3.0, has been removed. * The cast-as-lvalue extension has been removed for C++ and deprecated for C and Objective-C. In particular, code like this: int i; (char) i = 5; or this: char *p; ((int *) p)++; is no longer accepted for C++ and will not be accepted for C and Objective-C in a future version. * The conditional-expression-as-lvalue extension has been deprecated for C and Objective-C. In particular, code like this: int a, b, c; (a ? b : c) = 2; will not be accepted for C and Objective-C in a future version. * The compound-expression-as-lvalue extension has been deprecated for C and Objective-C. In particular, code like this: int a, b; (a, b) = 2; will not be accepted for C and Objective-C in a future version. A possible non-intrusive workaround is the following: (*(a, &b)) = 2; * Several [10]built-in functions such as __builtin_popcount for counting bits, finding the highest and lowest bit in a word, and parity have been added. * The -fwritable-strings option has been deprecated and will be removed. * Many C math library functions are now recognized as built-ins and optimized. * The C, C++, and Objective-C compilers can now handle source files written in any character encoding supported by the host C library. The default input character set is taken from the current locale, and may be overridden with the -finput-charset command line option. In the future we will add support for inline encoding markers. C++ * G++ is now much closer to full conformance to the ISO/ANSI C++ standard. This means, among other things, that a lot of invalid constructs which used to be accepted in previous versions will now be rejected. It is very likely that existing C++ code will need to be fixed. This document lists some of the most common issues. * A hand-written recursive-descent C++ parser has replaced the YACC-derived C++ parser from previous GCC releases. The new parser contains much improved infrastructure needed for better parsing of C++ source codes, handling of extensions, and clean separation (where possible) between proper semantics analysis and parsing. The new parser fixes many bugs that were found in the old parser. * You must now use the typename and template keywords to disambiguate dependent names, as required by the C++ standard. struct K { typedef int mytype_t; }; template struct A { template struct B { void callme(void); }; template void bar(void) { // Use 'typename' to tell the parser that T1::mytype_t names // a type. This is needed because the name is dependent (in // this case, on template parameter T1). typename T1::mytype_t x; x = 0; } }; template void template_func(void) { // Use 'template' to prefix member templates within // dependent types (a has type A, which depends on // the template parameter T). A a; a.template bar<0>(); // Use 'template' to tell the parser that B is a nested // template class (dependent on template parameter T), and // 'typename' because the whole A::B is // the name of a type (again, dependent). typename A::template B b; b.callme(); } void non_template_func(void) { // Outside of any template class or function, no names can be // dependent, so the use of the keyword 'typename' and 'template' // is not needed (and actually forbidden). A a; a.bar<0>(); A::B b; b.callme(); } * In a template definition, unqualified names will no longer find members of a dependent base (as specified by [temp.dep]/3 in the C++ standard). For example, template struct B { int m; int n; int f (); int g (); }; int n; int g (); template struct C : B { void h () { m = 0; // error f (); // error n = 0; // ::n is modified g (); // ::g is called } }; You must make the names dependent, e.g. by prefixing them with this->. Here is the corrected definition of C::h, template void C::h () { this->m = 0; this->f (); this->n = 0 this->g (); } As an alternative solution, you may use using declarations instead of this->: template struct C : B { using B::m; using B::f; using B::n; using B::g; void h () { m = 0; f (); n = 0; g (); } }; * In templates, all non-dependent names are now looked up and bound at definition time (while parsing the code), instead of later when the template is instantiated. For instance: void foo(int); template struct A { static void bar(void){ foo('a'); } }; void foo(char); int main() { A<0>::bar(); // Calls foo(int), used to call foo(char). } * In an explicit instantiation of a class template, you must use class or struct before the template-id: template class A {}; template A<0>; // error, not accepted anymore template class A<0>; // OK * The "named return value" and "implicit typename" extensions have been removed. * Default arguments in function types have been deprecated and will be removed. * ARM-style name-injection of friend declarations has been deprecated and will be removed. For example: struct S { friend void f(); }; void g() { f(); } will not be accepted by future versions of G++; instead a declaration of "f" will need to be present outside of the scope of "S". * Covariant returns are implemented for all but varadic functions that require an adjustment. * When -pedantic is used, G++ now issues errors about spurious semicolons. For example, namespace N {}; // Invalid semicolon. void f() {}; // Invalid semicolon. * G++ no longer accepts attributes for a declarator after the initializer associated with that declarator. For example, X x(1) __attribute__((...)); is no longer accepted. Instead, use: X x __attribute__((...)) (1); * Inside the scope of a template class, the name of the class itself can be treated as either a class or a template. So GCC used to accept the class name as argument of type template, and template template parameter. However this is not C++ standard compliant. Now the name is not treated as a valid template template argument unless you qualify the name by its scope. For example, the code below no longer compiles. template