From patchwork Wed Apr 19 15:18:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 752328 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3w7Qcx57Sgz9s0m for ; Thu, 20 Apr 2017 01:18:38 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="BYxveuiX"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; q=dns; s=default; b=ydZFTpBS9j28BlVzftQbMOVO2YSHVO cmrXlgY9faBNcB5T6W+Rw1VwUh8DFNJTJfBO1YSsKmNI9GUFa2BUtBhUxWUZxq0h sLi8NKUGlzw9CiKVKzk4ljP9+ulQ27WwzeZJCDxDDCM0DB7OqCWKujG2uBjp11R3 Y8yMorLMCKSPw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; s=default; bh=qgfTGHplVkjXo/R32dgeFBWM8ig=; b=BYxv euiXChORdgCi26jTJauXb5khGxDKjwYp08TkUF03eChn/EFy31ywXhqlOb4FgPvf aPryx9Chtrqm7GD699boE2XrI9V7ezOud53TUZNr5ZLmQ6a+R066/O6iDpPBYWDC qNyBtHdEj+/MzXQYpXjJ14cOIWsG5KAnx9nsbUc= Received: (qmail 44671 invoked by alias); 19 Apr 2017 15:18:27 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 44597 invoked by uid 89); 19 Apr 2017 15:18:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=our 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 ESMTP; Wed, 19 Apr 2017 15:18:25 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 076B92CAF04; Wed, 19 Apr 2017 15:18:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 076B92CAF04 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jwakely@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 076B92CAF04 Received: from localhost (unknown [10.33.36.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id AA33117140; Wed, 19 Apr 2017 15:18:25 +0000 (UTC) Date: Wed, 19 Apr 2017 16:18:24 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [PATCH] PR libstdc++/80446 cope with libc defining __has_builtin Message-ID: <20170419151824.GW3412@redhat.com> References: <20170419104907.GA9769@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170419104907.GA9769@redhat.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.8.0 (2017-02-23) On 19/04/17 11:49 +0100, Jonathan Wakely wrote: >Both newlib and FreeBSD have this in libc headers: > >#ifndef __has_builtin >#define __has_builtin(x) 0 >#endif > >This means our attempts to use #ifdef __has_builtin aren't reliable, >so we need a different approach. With this patch we don't care whether >it's defined or not, only its value. > > PR libstdc++/80446 > * include/std/type_traits (is_aggregate): Change __has_builtin checks. > * libsupc++/new (launder): Likewise. > >Tested ppc64le-linux and x86_64-freebsd11.0, committed to trunk. Jakub pointed out I forgot to update the macro name in a comment. Smoke-tested and committed to trunk. commit be2fd5feb898fefac9f97ffca6691b232d18fa5b Author: Jonathan Wakely Date: Wed Apr 19 16:11:34 2017 +0100 * libsupc++/new: Update comment on #endif directive. diff --git a/libstdc++-v3/libsupc++/new b/libstdc++-v3/libsupc++/new index 2de7752..04f172c 100644 --- a/libstdc++-v3/libsupc++/new +++ b/libstdc++-v3/libsupc++/new @@ -209,7 +209,7 @@ namespace std void launder(volatile void*) = delete; void launder(const volatile void*) = delete; } -#endif // _GLIBCXX_NO_BUILTIN_LAUNDER +#endif // _GLIBCXX_HAVE_BUILTIN_LAUNDER #undef _GLIBCXX_HAVE_BUILTIN_LAUNDER #endif // C++17