From patchwork Fri Apr 6 09:39:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 895656 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-475973-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="D6KYLvI/"; dkim-atps=neutral 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 40HZRg0X1Bz9s1R for ; Fri, 6 Apr 2018 19:39:58 +1000 (AEST) 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:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=ME8QyeyQcXVBi5uhs4O+CdBtCkm0FRL3unf+bFegWDKwk2Qr01 +DURMUf4UXzjR2/89Gn6J/Z4SO6KC0ZgCjSyZ/LN9B7O87YPhkXUtXBe24JqMPNo Yghd3YsSRn8xNM7/j190/kZwXc+/JPKGfeOGnIAkLQ9wXhNFcOtCg5Wm4= 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:cc:subject:message-id:mime-version:content-type; s= default; bh=dlHyWZ/Uxz8B37xWPZwykIdTv7o=; b=D6KYLvI/MO9Ux+E6vNt+ +2QX4T9DEzm461f2V73gwLIi1INQyWR7P9A7z1eeB0yg44sK/YMtEMZjWAmvhsyT t3qccdAB4bXDsHwEGwqdfCfYmUrriRkHiIWJsv268CCaD++nBEIx/AkduHLqEVxz hTjJLrtzEWaakVM+EaPuEmQ= Received: (qmail 754 invoked by alias); 6 Apr 2018 09:39:43 -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 729 invoked by uid 89); 6 Apr 2018 09:39:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=gcc4-compatible, gcc4compatible X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Apr 2018 09:39:40 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 24EE3AB3E; Fri, 6 Apr 2018 09:39:38 +0000 (UTC) Date: Fri, 6 Apr 2018 11:39:38 +0200 (CEST) From: Richard Biener To: gcc-patches@gcc.gnu.org cc: libstdc++@gcc.gnu.org Subject: [PATCH] Mitigate PR85222 a bit Message-ID: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 The following allows people configuring the gcc-4 compatible ABI as the default ABI to retain compatibility with old programs catching ios_base::failure by matching the abi version thrown to the configured default ABI. This doesn't really fix the PR but it makes behavior between the dual-ABI with default gcc-4 compatible consistent with that of the non-dual-ABI which is what I had expected. Whether an ABI break is really desired for the case of a c++11 default ABI is still questionable and any programs that differ from the default ABI choice will now be broken (compared to those differing from c++11). Bootstrapped on x86_64-unknown-linux-gnu, ok for trunk? Ok for the GCC 7 branch? I'm not sure if we want to revert r245167 after this? I'm re-running the testsuite with a gcc4-compatible ABI right now. At least with a "real" fix we should be able to run the affected tests twice, once with the new and once with the old ABI. Thanks, Richard. 2018-04-06 Richard Biener PR libstdc++/85222 * src/c++11/ios.cc: Remove hard define of _GLIBCXX_USE_CXX11_ABI to 1. Instead use the configured default ABI to decide the ABI version of ios_base::failure thrown by __throw_ios_failure. Index: libstdc++-v3/src/c++11/ios.cc =================================================================== --- libstdc++-v3/src/c++11/ios.cc (revision 258812) +++ libstdc++-v3/src/c++11/ios.cc (working copy) @@ -26,9 +26,8 @@ // ISO C++ 14882: 27.4 Iostreams base classes // -// Determines the version of ios_base::failure thrown by __throw_ios_failure. -// If !_GLIBCXX_USE_DUAL_ABI this will get undefined automatically. -#define _GLIBCXX_USE_CXX11_ABI 1 +// The ABI version of ios_base::failure thrown by __throw_ios_failure +// is determined by the default ABI version choosed at configure time #include #include