From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 66059 invoked by alias); 10 Jan 2019 21:27:57 -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 66038 invoked by uid 89); 10 Jan 2019 21:27:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY autolearn=ham version=3.3.2 spammy=istm, symbols.ver-sun, UD:symbols.ver-sun, ISTM X-HELO: smtp.CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE (HELO smtp.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 10 Jan 2019 21:27:54 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id DE38BAA2; Thu, 10 Jan 2019 22:27:50 +0100 (CET) Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id iTkNGnZp6LiK; Thu, 10 Jan 2019 22:27:47 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p4FDDB33E.dip0.t-ipconnect.de [79.221.179.62]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 317CEAA1; Thu, 10 Jan 2019 22:27:47 +0100 (CET) From: Rainer Orth To: Jonathan Wakely Cc: Ville Voutilainen , libstdc++ , "gcc-patches\@gcc.gnu.org" Subject: Re: [v3 PATCH] Implement LWG 2221, No formatted output operator for nullptr References: <20171204230424.GA31922@redhat.com> <20190110131519.GC15627@redhat.com> Date: Thu, 10 Jan 2019 21:27:00 -0000 In-Reply-To: <20190110131519.GC15627@redhat.com> (Jonathan Wakely's message of "Thu, 10 Jan 2019 13:15:19 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (usg-unix-v) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00577.txt.bz2 --=-=-= Content-Type: text/plain Content-length: 2796 Hi Jonathan, > On 04/12/17 23:04 +0000, Jonathan Wakely wrote: >>On 03/12/17 23:08 +0200, Ville Voutilainen wrote: >>>Tested on Linux-x64. >>> >>>2017-11-14 Ville Voutilainen >>> >>> Implement LWG 2221 >>> * include/std/ostream (operator<<(nullptr_t)): New. >>> * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New. >> >>>diff --git a/libstdc++-v3/include/std/ostream >>> b/libstdc++-v3/include/std/ostream >>>index f7cab03..18011bc 100644 >>>--- a/libstdc++-v3/include/std/ostream >>>+++ b/libstdc++-v3/include/std/ostream >>>@@ -245,6 +245,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION >>> operator<<(const void* __p) >>> { return _M_insert(__p); } >>> >>>+#if __cplusplus > 201402L >>>+ __ostream_type& >>>+ operator<<(nullptr_t) >>>+ { return *this << "nullptr"; } >>>+#endif >> >>As discussed on IRC, this requires a new symbol to be exported for the >>std::ostream and std::wostream explicit instantiations, or the new >>test will fail to link at -O0. >> >>That should wait for stage 1. >> > > This patch for a C++17 feature (posted over a year ago) should have > gone in during stage 1. I've taken care of the symbol exports that > were missing from the original patch. > > Tested x86_64-linux, committed to trunk. this patch broke Solaris bootstrap: ld: fatal: libstdc++-symbols.ver-sun: 7117: symbol 'std::basic_ostream >::operator<<(decltype(nullptr))': symbol version conflict ld: fatal: libstdc++-symbols.ver-sun: 7119: symbol 'std::basic_ostream >::operator<<(decltype(nullptr))': symbol version conflict ld: fatal: libstdc++-symbols.ver-sun: 7117: symbol '_ZNSolsEDn': symbol version conflict ld: fatal: libstdc++-symbols.ver-sun: 7119: symbol '_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEDn': symbol version conflict Again, there were two matches for those two symbols: GLIBCXX_3.4 ##_ZNSolsE*[^Dg] (glob) _ZNSolsEDn; GLIBCXX_3.4.26 ##_ZNSolsEDn (glob) _ZNSolsEDn; GLIBCXX_3.4 ##_ZNSt13basic_ostreamIwSt11char_traitsIwEElsE*[^Dg] (glob) _ZNSt13basic_ostreamIwSt11char_traitsIwEElsEDn; GLIBCXX_3.4.26 ##_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEDn (glob) _ZNSt13basic_ostreamIwSt11char_traitsIwEElsEDn; ISTM that the patterns were backwards. The following patch fixes this and allowed i386-pc-solaris2.11 bootstrap to complete without regressions relative to the last successful one. Ok for mainline? Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University 2019-01-10 Rainer Orth * config/abi/pre/gnu.ver(GLIBCXX_3.4): Fix pattern. (GLIBCXX_3.4.21): Likewise. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=sol2-v3-lwg2221.patch Content-length: 983 # HG changeset patch # Parent f8d5e17fd8042e330c31d714b9c619c1807d93cb Fix libstdc++.so link on Solaris with C++17 LWG 2221 support diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver --- a/libstdc++-v3/config/abi/pre/gnu.ver +++ b/libstdc++-v3/config/abi/pre/gnu.ver @@ -495,7 +495,7 @@ GLIBCXX_3.4 { _ZNSo8_M_writeEPKc[ilx]; _ZNSo3put*; _ZNSo[5-9][a-z]*; - _ZNSolsE*[^Dg]; + _ZNSolsE[^Dg]*; # std::basic_ostream _ZNSt13basic_ostreamIwSt11char_traitsIwEEC[12]Ev; @@ -509,7 +509,7 @@ GLIBCXX_3.4 { _ZNSt13basic_ostreamIwSt11char_traitsIwEE5writeEPKw*; _ZNSt13basic_ostreamIwSt11char_traitsIwEE6sentry*; _ZNSt13basic_ostreamIwSt11char_traitsIwEE8_M_writeEPKw[ilx]; - _ZNSt13basic_ostreamIwSt11char_traitsIwEElsE*[^Dg]; + _ZNSt13basic_ostreamIwSt11char_traitsIwEElsE[^Dg]*; # std::ostream operators and inserters _ZSt4end[ls]I[cw]St11char_traitsI[cw]EERSt13basic_ostream*; --=-=-=--