From patchwork Fri Jan 6 12:41:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 711894 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 3tw418125sz9sf9 for ; Fri, 6 Jan 2017 23:41:31 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Pmoz6ID7"; 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:mime-version:content-type; q=dns; s= default; b=K6FZUfphU0n7tU6aa2ayBfK2qlYR2wL0YOEsB1euVGe98Z0eWsIVM NLAKUEOJoReF6XQ7vJ5XokNvhyQ002+7KsxNl5fFrYMlVp/rCdH112abNojzUDFG /fURxrc28B2UJADn3i3mHp32LuB4Qz/QoORPkWihKvLmjjG8xBToCw= 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:mime-version:content-type; s= default; bh=A4WBqOkTnxSHq+LHrwojiVNX/VI=; b=Pmoz6ID7oIMTRkULMq3X 3hlbKnNkg6mAJjhOZXNXgO9y9KMTzNaOSGxTOkx165kDxMS3pX4i8ujdbkdDy5+N 8+hpC68vTp/yvWQTAG0yZxVkGhS9rXNQ2zpVOV+HZ/cnuC6bmBYb3G8Gld4nvkt1 yHxW78VbxjAve2UYL6Wdvdk= Received: (qmail 112141 invoked by alias); 6 Jan 2017 12:41:11 -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 112063 invoked by uid 89); 6 Jan 2017 12:41:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.1 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=4237, Hx-languages-length:953 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; Fri, 06 Jan 2017 12:41:04 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B9AFD46291; Fri, 6 Jan 2017 12:41:04 +0000 (UTC) Received: from localhost (ovpn-116-26.ams2.redhat.com [10.36.116.26]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v06Cf3CF024817; Fri, 6 Jan 2017 07:41:04 -0500 Date: Fri, 6 Jan 2017 12:41:02 +0000 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH] Don't redefine _GLIBCXX_ASSERTIONS if already defined Message-ID: <20170106124102.GA7704@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.7.1 (2016-10-04) This avoids a potential redefinition warning if users define both _GLIBCXX_DEBUG and _GLIBCXX_ASSERTIONS. * include/bits/c++config (_GLIBCXX_ASSERTIONS): Avoid redefinition. Tested powerpc64le-linux, committed to trunk. commit e6b4586112080ac1912d336451207cba963a2c48 Author: Jonathan Wakely Date: Fri Jan 6 11:30:25 2017 +0000 Don't redefine _GLIBCXX_ASSERTIONS if already defined * include/bits/c++config (_GLIBCXX_ASSERTIONS): Avoid redefinition. diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index b2eea3c..0cc1865 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -423,7 +423,7 @@ namespace std #endif // Debug Mode implies checking assertions. -#ifdef _GLIBCXX_DEBUG +#if defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_ASSERTIONS) # define _GLIBCXX_ASSERTIONS 1 #endif