From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107850 invoked by alias); 23 Feb 2016 10:16:30 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 107831 invoked by uid 89); 23 Feb 2016 10:16:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 23 Feb 2016 10:16:28 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 52490C0006FD; Tue, 23 Feb 2016 10:16:27 +0000 (UTC) Received: from localhost (ovpn-116-86.ams2.redhat.com [10.36.116.86]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1NAGQ0B008677; Tue, 23 Feb 2016 05:16:26 -0500 Date: Tue, 23 Feb 2016 10:16:00 -0000 From: Jonathan Wakely To: Bernd Edlinger Cc: "gcc-patches@gcc.gnu.org" , "libstdc++@gcc.gnu.org" Subject: Re: [PATCH] Make cstddef / cstdarg more robust (PR 69881) Message-ID: <20160223101626.GF3171@redhat.com> References: <20160223094232.GE3171@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.5.24 (2015-08-30) X-SW-Source: 2016-02/txt/msg01550.txt.bz2 On 23/02/16 10:00 +0000, Bernd Edlinger wrote: >On 23/02/15 10:42, Jonathan Wakely wrote: >>On 23/02/16 07:15 +0000, Bernd Edlinger wrote: >>>as described in the PR 69881 it happens quite often that cstddef is >>>called with __need_size_t because we still support gmp-4.3.2 which >>>is installed by contrib/download_prerequisites. This causes a kind >>>of undefined behavior. It is just by chance that this does not cause >>>the gcc-6 boot-strap to fail, but it causes gcc-4.9 bootstrap to fail >>>when the gcc-6 version of cstddef is around. So it looks like a >>>regression, because the new cstddef is more fragile than before. >> >>Is it? cstddef hasn't been changed since 2013-06-11. cstdarg hasn't >>been changed since 2011-01-30. >> >>What made them more fragile? > >Good question. > >The cstddef had this even in gcc.4.9 that's true, but it was not used >by default: > >#if __cplusplus >= 201103L >namespace std >{ > // We handle size_t, ptrdiff_t, and nullptr_t in c++config.h. > using ::max_align_t; >} >#endif > > >Previously the g++ default was --std=gnu++98, >but gcc-6 changed the default to --std=gnu++14. Ah yes. >And when building gcc-4.9, stage1 does not override that with >--std=gnu++98. > >That has changed, and that triggers the latent bug. Alright then, the patch is OK for trunk. I might revert it once we stop using the buggy GMP in contrib/download_prerequisites.