Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

Upcoming features in GCC 6

February 23, 2016
Jeff Law
Related topics:
Developer tools
Related products:
Developer Toolset

    The GCC project has traditionally made major releases yearly in the March/April timeframe.  March is rapidly approaching and the GCC project's engineers are busy polishing things up for the GCC 6 release.  I'm going to take a short break from my own release efforts to briefly talk about some of the new features.

    Warnings GCC strives to implement warnings which help developers catch errors at compile time rather than allow potentially dangerous code to be silently accepted and ultimately deployed.   For GCC 6, the major warning additions are:

    Misleading indentation: The goal of the misleading indentation warning is to detect code where the block structure likely does not match how a human would read the code.  The most obvious example is the the "Apple SSL bug" from 2014 where mis-indented code made it look like a GOTO was guarded by a prior IF conditional, when in fact it was not guarded at all.  This will be covered in more detail in a blog post from David Malcolm.

    Tautological comparisons: Code which compares an object to itself and which always evaluates to the same result often represents a typo/bug in the source code.  GCC 6 will now warn for such comparisons.

    Duplicated Condition: GCC 6 will now warn when a condition is repeated in an IF-ELSE-IF chain.

    Negative shift value and shift overflow: GCC now warns when left shifting a negative value or when a left shift overflows.  These have always had undefined behavior and catching them at compile time rather than allowing runtime undefined behaviour is always advisable.

    null-dereference:  GCC is more aggressive about detecting paths that trigger erroneous or undefined behaviour by dereferencing a NULL pointer or using a NULL value in a return or as a function argument when a NULL value for that argument/return value has been explicitly disallowed by the function's attributes.

    Features: Each release of GCC brings a variety of new features designed to make development using GCC easier in some way or another.  Highlights from the upcoming GCC 6 release include:

    OpenMP 4.5:  OpenMP is an API to provide a simple, but highly flexible interface for developing parallel C, C++ and Fortran programs.  The OpenMP 4.5 specification was released in November 2015 and includes many new changes since the prior OpenMP 4.0 specification.  GCC 6 will include support for OpenMP 4.5 for C and C++ and OpenMP 4.0 support for Fortran with some degree of offloading support, particularly for the Intel MIC processor.

    Segment register support:  The x86/x86_64 is a segmented memory architecture, yet GCC has largely ignored this aspect of the Intel architecture and relied on implicit segment registers.  Low level code such as the Linux kernel & glibc often have to be aware of the segmented architecture and have traditionally resorted to asm statements to use explicit segment registers for memory accesses.  Starting with GCC 6, variables may be declared as being relative to a particular segment.  Explicit segment registers will then be used to access those variables in memory.

    Rich locations and other diagnostic work: GCC 6 adds the concept of "rich locations" to its diagnostic machinery.  This allows GCC to track ranges rather than just points for diagnostic messages.  So, for example, the problematical subexpression within a more complex expression can be identified and highlighted to the developer.  Diagnostics can now include "fix-it" hints which can suggest how incorrect code can be fixed.  This will be covered in more depth in a separate blog post from David Malcolm.

    Target Clones:  GCC 6 adds the new "target_clones" attribute which specifies that a particular function should be compiled multiple times for different ISA variants and a runtime dispatcher created to check the in-use ISA and call the appropriate clone.  This makes it much easier to support runtime-specialized routines for different versions of a particular ISA.

    Scalar Storage Order:  GCC 6 adds an new pragma "scalar_storage_order" which can be used to specify the endianness of fields within a structure.  GCC will automatically generate code to byte swap these objects as-needed if the target's endianness differs from the endianness of the objects being accessed.

    Offloading/HSA: GCC 5 had initial support for offloading to MIC via OpenMP and to NVidia GPUs via OpenACC.  GCC 6 improves on those existing capabilities and also adds offloading via HSA accelerators.

    Languages and Runtime Libraries:

    GCC 6 now defaults to C++ 14.  GCC 6 now includes C++ Concepts.

    The C++ runtime library now supports mathematical special functions (ISO/IEC 29124:2010)

    Experimental support for C++17 features

    std::uncaught_exceptions

    try_emplace and insert_or_assign for unique_key maps

    non-member functions std::size, std::empty and std::data for accessing containers and arrays

    std::invoke

    std::shared_mutex

    std::void_t and std::bool_constant

    Experimental support for the File System TS

    Experimental support for most of the second version of the Library Fundamentals TS, including polymorphic memory resources and array support in shared_ptr

    MATMUL intrinsic is now inlined for simple cases in the Fortran front-end

    And, of course more optimizations and bugfixes than you can shake a stick at.  I won't even try to enumerate all that's happened in this space.  As is the case with ever release, we strive to improve the generated code in as many cases as we can and fix as many reported bugs as we can.

     

     

    Recent Posts

    • Every layer counts: Defense in depth for AI agents with Red Hat AI

    • Fun in the RUN instruction: Why container builds with distroless images can surprise you

    • Trusted software factory: Building trust in the agentic AI era

    • Build a zero trust AI pipeline with OpenShift and RHEL CVMs

    • Red Hat Hardened Images: Top 5 benefits for software developers

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Chat Support

    Please log in with your Red Hat account to access chat support.