GCC 4.8 Released
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2009
    0 Post(s)
    0 Thread(s)

    GCC 4.8 Released


    General Optimizer Improvements (and Changes)

    DWARF4 is now the default when generating DWARF debug information. When -g is used on a platform that uses DWARF debugging information, GCC will now default to -gdwarf-4 -fno-debug-types-section.
    GDB 7.5, Valgrind 3.8.0 and elfutils 0.154 debug information consumers support DWARF4 by default. Before GCC 4.8 the default version used was DWARF2. To make GCC 4.8 generate an older DWARF version use -g together with -gdwarf-2 or -gdwarf-3. The default for Darwin and VxWorks is still -gdwarf-2 -gstrict-dwarf.
    A new general optimization level, -Og, has been introduced. It addresses the need for fast compilation and a superior debugging experience while providing a reasonable level of runtime performance. Overall experience for development should be better than the default optimization level -O0.
    A new option -ftree-partial-pre was added to control the partial redundancy elimination (PRE) optimization. This option is enabled by default at the -O3 optimization level, and it makes PRE more aggressive.
    The option -fconserve-space has been removed; it was no longer useful on most targets since GCC supports putting variables into BSS without making them common.
    The struct reorg and matrix reorg optimizations (command-line options -fipa-struct-reorg and -fipa-matrix-reorg) have been removed. They did not always work correctly, nor did they work with link-time optimization (LTO), hence were only applicable to programs consisting of a single translation unit.
    Several scalability bottle-necks have been removed from GCC's optimization passes. Compilation of extremely large functions, e.g. due to the use of the flatten attribute in the "Eigen" C++ linear algebra templates library, is significantly faster than previous releases of GCC.
    Link-time optimization (LTO) improvements:
    LTO partitioning has been rewritten for better reliability and maintanibility. Several important bugs leading to link failures have been fixed.
    Interprocedural optimization improvements:
    A new symbol table has been implemented. It builds on existing callgraph and varpool modules and provide a new API. Unusual symbol visibilities and aliases are handled more consistently leading to, for example, more aggressive unreachable code removal with LTO.
    The inline heuristic can now bypass limits on the size of of inlined functions when the inlining is particularly profitable. This happens, for example, when loop bounds or array strides get propagated.
    Values passed through aggregates (either by value or reference) are now propagated at the inter-procedural level leading to better inlining decisions (for example in the case of Fortran array descriptors) and devirtualization.
    AddressSanitizer , a fast memory error detector, has been added and can be enabled via -fsanitize=address. Memory access instructions will be instrumented to detect heap-, stack-, and global-buffer overflow as well as use-after-free bugs. To get nicer stacktraces, use -fno-omit-frame-pointer. The AddressSanitizer is available on IA-32/x86-64/x32/PowerPC/PowerPC64 GNU/Linux and on x86-64 Darwin.
    ThreadSanitizer has been added and can be enabled via -fsanitize=thread. Instructions will be instrumented to detect data races. The ThreadSanitizer is available on x86-64 GNU/Linux.

    New Languages and Language specific improvements
    C family

    Each diagnostic emitted now includes the original source line and a caret '^' indicating the column. The option -fno-diagnostics-show-caret suppresses this information.
    The option -ftrack-macro-expansion=2 is now enabled by default. This allows the compiler to display the macro expansion stack in diagnostics. Combined with the caret information, an example diagnostic showing these two features is:

    t.c:1:94: error: invalid operands to binary < (have ‘struct mystruct’ and ‘float’)
    #define MYMAX(A,B) __extension__ ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
    t.c:7:7: note: in expansion of macro 'MYMAX'
    X = MYMAX(P, F);

    A new -Wsizeof-pointer-memaccess warning has been added (also enabled by -Wall) to warn about suspicious length parameters to certain string and memory built-in functions if the argument uses sizeof. This warning warns e.g. about memset (ptr, 0, sizeof (ptr)); if ptr is not an array, but a pointer, and suggests a possible fix, or about memcpy (&foo, ptr, sizeof (&foo));.
    The new option -Wpedantic is an alias for -pedantic, which is now deprecated. The forms -Wno-pedantic, -Werror=pedantic, and -Wno-error=pedantic work in the same way as for any other -W option. One caveat is that -Werror=pedantic is not equivalent to -pedantic-errors, since the latter makes into errors some warnings that are not controlled by -Wpedantic, and the former only affects diagnostics that are disabled when using -Wno-pedantic.
    The option -Wshadow no longer warns if a declaration shadows a function declaration, unless the former declares a function or pointer to function, because this is a common and valid case in real-world code.


    G++ now implements the C++11 thread_local keyword; this differs from the GNU __thread keyword primarily in that it allows dynamic initialization and destruction semantics. Unfortunately, this support requires a run-time penalty for references to non-function-local thread_local variables defined in a different translation unit even if they don't need dynamic initialization, so users may want to continue to use __thread for TLS variables with static initialization semantics.

    If the programmer can be sure that no use of the variable in a non-defining TU needs to trigger dynamic initialization (either because the variable is statically initialized, or a use of the variable in the defining TU will be executed before any uses in another TU), they can avoid this overhead with the -fno-extern-tls-init option.

    OpenMP threadprivate variables now also support dynamic initialization and destruction by the same mechanism.
    G++ now implements the C++11 attribute syntax, e.g.

    [[noreturn]] void f();

    and also the alignment specifier, e.g.

    alignas(double) int i;

    G++ now implements C++11 inheriting constructors, e.g.

    struct A { A(int); };
    struct B: A { using A::A; }; // defines B::B(int)
    B b(42); // OK

    G++ now supports a -std=c++1y option for experimentation with features proposed for the next revision of the standard, expected around 2017. Currently the only difference from -std=c++11 is support for return type deduction in normal functions, as proposed in N3386.
    The G++ namespace association extension, __attribute ((strong)), has been deprecated. Inline namespaces should be used instead.
    G++ now supports a -fext-numeric-literal option to control whether GNU numeric literal suffixes are accepted as extensions or processed as C++11 user-defined numeric literal suffixes. The flag is on (use suffixes for GNU literals) by default for -std=gnu++*, and -std=c++98. The flag is off (use suffixes for user-defined literals) by default for -std=c++11 and later.

    Runtime Library (libstdc++)

    Improved experimental support for the new ISO C++ standard, C++11, including:
    forward_list meets the allocator-aware container requirements;
    this_thread::sleep_for(), this_thread::sleep_until() and this_thread::yield() are defined without requiring the configure option --enable-libstdcxx-time;
    Improvements to <random>:
    SSE optimized normal_distribution.
    Use of hardware RNG instruction for random_device on new x86 processors (requires the assembler to support the instruction.)
    and <ext/random>:
    New random number engine simd_fast_mersenne_twister_engine with an optimized SSE implementation.
    New random number distributions beta_distribution, normal_mv_distribution, rice_distribution, nakagami_distribution, pareto_distribution, k_distribution, arcsine_distribution, hoyt_distribution.
    Added --disable-libstdcxx-verbose configure option to disable diagnostic messages issued when a process terminates abnormally. This may be useful for embedded systems to reduce the size of executables that link statically to the library.

  2. #2
    Demz3 Guest

    Re: GCC 4.8 Released

    its a Release candidate, it hasnt officially been released as final yet so you may wanna change the subject title

    ---------- Post added at 09:54 AM ---------- Previous post was at 09:51 AM ----------


    Jakub Jelinek of Red Hat announced the first release candidate of GCC 4.8.0 on Saturday morning.

    ---------- Post added at 10:26 AM ---------- Previous post was at 09:54 AM ----------

    dunno why you even bothered postin about GCC, not even worth posting about its release IMO

  3. #3
    Join Date
    Aug 2009
    0 Post(s)
    0 Thread(s)

    Re: GCC 4.8 Released

    you are right, it seems just RC yet.

  4. #4
    Join Date
    Aug 2009
    0 Post(s)
    0 Thread(s)

Similar Threads

  1. Replies: 4
    Last Post: 31st May 2011, 07:24 PM
  2. gcc is needed to install... gcc?
    By CtrlK in forum Programming & Packaging
    Replies: 1
    Last Post: 23rd September 2010, 06:04 AM
  3. gcc 4 vs gcc 3 (fortran issue)
    By longman in forum Using Fedora
    Replies: 2
    Last Post: 14th December 2006, 03:30 AM
  4. Replies: 3
    Last Post: 15th July 2005, 10:09 AM
  5. compat-gcc and gcc
    By dwisianto in forum Using Fedora
    Replies: 2
    Last Post: 29th March 2005, 06:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts