Today gcc-11.1.0 released upstream and was added to ::gentoo as:
    
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc068d96fb49e308456cbe944fb29b1f78e6ad5c

User-visible changes are nicely described in upstream porting doc:
    https://gcc.gnu.org/gcc-11/porting_to.html

A few highlights I personally encountered are:
- use -std=gnu++17 instead of -std=gnu++14
- ordered pointer comparison with integer (like int *p; 'p > 0')
- dynamic exception specifications
- gcc now enforces that comparison objects be invocable as const
- header dependency changes

On top of that:
- -fipa-modref (enabled by default) might expose latent bugs in existing
  programs. -fno-ipa-modref should be a quick hack to check the hypothesis.

Failures don't look widespread, thus gcc-11 should be fine to use as a
default compiler.

Check out known bugs and workarounds on gcc-11 tracker:
    https://bugs.gentoo.org/show_bug.cgi?id=gcc-11

Gentoo Toolchain wiki page for common fixes (nothing there so far):
    https://wiki.gentoo.org/wiki/Project:Toolchain#gcc-11

As usual if you can't figure out what is wrong with your package
pull in toolchain@ to the bug and we'll get to the bottom of it.

Good luck!

-- 

  Sergei

Reply via email to