From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-dev+bounces-94309-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 56F771382C5
	for <garchives@archives.gentoo.org>; Tue, 27 Apr 2021 18:22:38 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 722C4E0857;
	Tue, 27 Apr 2021 18:22:33 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 2AB3DE07AE
	for <gentoo-dev@lists.gentoo.org>; Tue, 27 Apr 2021 18:22:33 +0000 (UTC)
Date: Tue, 27 Apr 2021 19:22:27 +0100
From: Sergei Trofimovich <slyfox@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] gcc-11 enters ~arch tree
Message-ID: <20210427192227.3b89875d@sf>
X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu)
Precedence: bulk
List-Post: <mailto:gentoo-dev@lists.gentoo.org>
List-Help: <mailto:gentoo-dev+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org>
X-BeenThere: gentoo-dev@lists.gentoo.org
Reply-to: gentoo-dev@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Archives-Salt: b7d3d7da-14cc-459e-917d-438a9c784401
X-Archives-Hash: 979b6b8621a210e45bdbf5021cde9dba

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