From patchwork Fri Oct 21 19:21:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Fran=C3=A7ois_Dumont?= X-Patchwork-Id: 78711 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp1459954qge; Fri, 21 Oct 2016 12:22:10 -0700 (PDT) X-Received: by 10.99.145.193 with SMTP id l184mr3519190pge.99.1477077730524; Fri, 21 Oct 2016 12:22:10 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id m6si3827376pgm.277.2016.10.21.12.22.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Oct 2016 12:22:10 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-439275-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-439275-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-439275-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:references:cc:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=EOFL51Y+GLWS+JKEI 8yPjWWw9GJu+WpvgQzpCP+T7BuriH4kdzf1VpbpTtcGsRm0DXNzpMasLcOrhhAag SkPglPew8WpqW9nS/mdFjlvaUY13nvw2dAhz3ovXA2RK2c6G84fU/btrchPtoJUA EKEUI+KjL3pKUoHMH9sqHGad40= 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:from :subject:to:references:cc:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=2alVQAicFwfrGcSaIOegCIT 9CVw=; b=N7CEF8BEWxrok/1dAlfyUQMPqVi0U2ztkHVWIdD8BGRWHYUgV8GuVHq H9t08II4HS1P8avqPEKTOFUTCUVwpLRDfR9HJhqPa9wUTae/myFwE12S3A+f3zGS oCfy8O9ZlNWnD8C44jWKEFgQsaFmLiIO9EzgGDryb/4AXvGsRmpA= Received: (qmail 38444 invoked by alias); 21 Oct 2016 19:21:53 -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 38413 invoked by uid 89); 21 Oct 2016 19:21:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-1.8 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=multimap, inserters, 21_strings, fran=e7ois?= X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-wm0-f48.google.com Received: from mail-wm0-f48.google.com (HELO mail-wm0-f48.google.com) (74.125.82.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 21 Oct 2016 19:21:41 +0000 Received: by mail-wm0-f48.google.com with SMTP id c78so2323945wme.0; Fri, 21 Oct 2016 12:21:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to; bh=cngqOwxTfzgEYpvr09+Gb5mon4+v1+h6AlhVYd1EkG8=; b=alZLsLMgM+dmfPVVXhQz0mKhvTPSnpc2R1zN3fVrm7rCkvhD2zOVqLMeITX9gg2yvM 9AYPFqlJwnOeZyRnJpL363ckFtCrs30Dkzk6PhFaveLWeeujB+F6U9KKf8mY6HxZSf5X S24CRzRpI6SuGBSAOgcPecGUHBB9y2w/2JHPsvJgzJLWbM0qZ5xOmomBPxrDdYzyeN/K 2LdmlIpHgXzg7Dc9ZRIWFRl4WjSzjIYN8yPc71EtrdFn5ob0NZJFj9F58UDgtOCq1yE+ 8J8SGJBf+eNEgHuyg2Y+KyXxl7w4cJp0T0twTWLIAiCh0KFTPzKK3xyBK5mbjlPnbYAP gc8A== X-Gm-Message-State: ABUngvdoOJUVm4LeITjrvEFvUvSSD6xjTyL4HmdOp+Oomrsgsv7B7p+VDYKBO+0LAscyhg== X-Received: by 10.194.104.232 with SMTP id gh8mr2026722wjb.49.1477077698464; Fri, 21 Oct 2016 12:21:38 -0700 (PDT) Received: from [192.168.0.23] (arf62-1-82-237-250-248.fbx.proxad.net. [82.237.250.248]) by smtp.googlemail.com with ESMTPSA id a7sm4368977wjj.22.2016.10.21.12.21.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Oct 2016 12:21:37 -0700 (PDT) From: =?UTF-8?Q?Fran=c3=a7ois_Dumont?= Subject: Re: Use version namespace in normal mode To: Jonathan Wakely References: <34ba2c69-d663-4bd3-dc7a-8efef3e56afe@gmail.com> <20160930154034.GV29482@redhat.com> <13dd85eb-5d2d-7d4b-4bce-810b9281553f@gmail.com> <20161006160649.GT29482@redhat.com> Cc: "libstdc++@gcc.gnu.org" , gcc-patches Message-ID: <44095163-84f6-8d68-9195-eecb7d5cfbe1@gmail.com> Date: Fri, 21 Oct 2016 21:21:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20161006160649.GT29482@redhat.com> Hi I configured libstdc++ to use gnu-version-namespace and there are a number of failures, see below. But none of them related to this patch so is it ok to commit ? The results: FAIL: libstdc++-abi/abi_check 3709 symbols reported as added. I don't know what to think about it. I see a gnu-versioned-namespace.ver in config/abi/pre, is it the list of symbols to support when versioned namespace is activated ? The list looks pretty limited. FAIL: 18_support/headers/limits/synopsis.cc (test for excess errors) FAIL: 20_util/headers/functional/synopsis.cc (test for excess errors) FAIL: 20_util/headers/memory/synopsis.cc (test for excess errors) FAIL: 20_util/headers/utility/synopsis.cc (test for excess errors) FAIL: 21_strings/headers/string/synopsis.cc (test for excess errors) FAIL: 22_locale/headers/locale/synopsis.cc (test for excess errors) FAIL: 23_containers/headers/bitset/synopsis.cc (test for excess errors) FAIL: 23_containers/headers/deque/synopsis.cc (test for excess errors) FAIL: 23_containers/headers/forward_list/synopsis.cc (test for excess errors) FAIL: 23_containers/headers/list/synopsis.cc (test for excess errors) FAIL: 23_containers/headers/map/synopsis.cc (test for excess errors) FAIL: 23_containers/headers/queue/synopsis.cc (test for excess errors) FAIL: 23_containers/headers/set/synopsis.cc (test for excess errors) FAIL: 23_containers/headers/stack/synopsis.cc (test for excess errors) FAIL: 23_containers/headers/vector/synopsis.cc (test for excess errors) FAIL: 24_iterators/headers/iterator/synopsis.cc (test for excess errors) FAIL: 24_iterators/headers/iterator/synopsis_c++11.cc (test for excess errors) FAIL: 24_iterators/headers/iterator/synopsis_c++14.cc (test for excess errors) FAIL: 24_iterators/headers/iterator/synopsis_c++17.cc (test for excess errors) FAIL: 26_numerics/headers/complex/synopsis.cc (test for excess errors) FAIL: 26_numerics/headers/valarray/synopsis.cc (test for excess errors) FAIL: 27_io/headers/fstream/synopsis.cc (test for excess errors) FAIL: 27_io/headers/ios/synopsis.cc (test for excess errors) FAIL: 27_io/headers/istream/synopsis.cc (test for excess errors) FAIL: 27_io/headers/ostream/synopsis.cc (test for excess errors) FAIL: 27_io/headers/sstream/synopsis.cc (test for excess errors) FAIL: 27_io/headers/streambuf/synopsis.cc (test for excess errors) FAIL: tr1/2_general_utilities/headers/functional/synopsis.cc (test for excess errors) FAIL: tr1/2_general_utilities/headers/memory/synopsis.cc (test for excess errors) FAIL: tr1/3_function_objects/headers/functional/synopsis.cc (test for excess errors) FAIL: tr1/4_metaprogramming/headers/type_traits/synopsis.cc (test for excess errors) FAIL: tr1/6_containers/headers/array/synopsis.cc (test for excess errors) FAIL: tr1/6_containers/headers/unordered_map/synopsis.cc (test for excess errors) FAIL: tr1/6_containers/headers/unordered_set/synopsis.cc (test for excess errors) All those failures are coming from declaration or explicit instantiations of template types expected to be in std but being in fact in std::__7. Should I add usage of _GLIBCXX_BEGIN_NAMESPACE_VERSION/_GLIBCXX_END_NAMESSPACE_VERSION in those files ? Or introduce a dg-require-no-versioned-namespace ? FAIL: 17_intro/using_namespace_std_tr1_neg.cc (test for errors, line 65) FAIL: 21_strings/basic_string/cons/char/7.cc (test for excess errors) FAIL: 21_strings/basic_string/cons/wchar_t/7.cc (test for excess errors) FAIL: 21_strings/basic_string/lwg2758.cc (test for excess errors) FAIL: 21_strings/basic_string/modifiers/append/char/4.cc (test for excess errors) FAIL: 21_strings/basic_string/modifiers/append/wchar_t/4.cc (test for excess errors) FAIL: 21_strings/basic_string/modifiers/assign/char/4.cc (test for excess errors) FAIL: 21_strings/basic_string/modifiers/assign/wchar_t/4.cc (test for excess errors) FAIL: 21_strings/basic_string/modifiers/insert/char/3.cc (test for excess errors) FAIL: 21_strings/basic_string/modifiers/insert/wchar_t/3.cc (test for excess errors) FAIL: 21_strings/basic_string/modifiers/replace/char/7.cc (test for excess errors) FAIL: 21_strings/basic_string/modifiers/replace/wchar_t/7.cc (test for excess errors) FAIL: 21_strings/basic_string/operations/compare/char/2.cc (test for excess errors) FAIL: 21_strings/basic_string/operations/compare/wchar_t/2.cc (test for excess errors) FAIL: 21_strings/basic_string/operations/find/char/5.cc (test for excess errors) FAIL: 21_strings/basic_string/operations/find/wchar_t/5.cc (test for excess errors) FAIL: 21_strings/basic_string/operators/char/5.cc (test for excess errors) FAIL: 21_strings/basic_string/operators/wchar_t/5.cc (test for excess errors) FAIL: 21_strings/basic_string_view/cons/char/1.cc (test for excess errors) FAIL: 21_strings/basic_string_view/cons/wchar_t/1.cc (test for excess errors) FAIL: 21_strings/basic_string_view/inserters/char/1.cc (test for excess errors) FAIL: 21_strings/basic_string_view/inserters/char/2.cc (test for excess errors) FAIL: 21_strings/basic_string_view/inserters/char/3.cc (test for excess errors) FAIL: 21_strings/basic_string_view/inserters/wchar_t/1.cc (test for excess errors) FAIL: 21_strings/basic_string_view/inserters/wchar_t/2.cc (test for excess errors) FAIL: 21_strings/basic_string_view/inserters/wchar_t/3.cc (test for excess errors) FAIL: 21_strings/basic_string_view/operations/string_conversion/1.cc (test for excess errors) FAIL: 23_containers/map/modifiers/erase/abi_tag.cc scan-assembler _ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5eraseB5cxx11ESt17_Rb_tree_iteratorIS4_E FAIL: 23_containers/multimap/modifiers/erase/abi_tag.cc scan-assembler _ZNSt8multimapIiiSt4lessIiESaISt4pairIKiiEEE5eraseB5cxx11ESt17_Rb_tree_iteratorIS4_E FAIL: 23_containers/multiset/modifiers/erase/abi_tag.cc scan-assembler _ZNSt8multisetIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE FAIL: 23_containers/multiset/modifiers/erase/abi_tag.cc scan-assembler _ZNSt8multisetIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiES5_ FAIL: 23_containers/set/modifiers/erase/abi_tag.cc scan-assembler _ZNSt3setIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE FAIL: 23_containers/set/modifiers/erase/abi_tag.cc scan-assembler _ZNSt3setIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiES5_ FAIL: 26_numerics/complex/abi_tag.cc scan-assembler _ZNKSt7complexIfE4realB5cxx11Ev Those failures are due to dual abi being disable when versioned namespace is being used, in configure: if test x$enable_symvers = xgnu-versioned-namespace; then # gnu-versioned-namespace is incompatible with the dual ABI. enable_libstdcxx_dual_abi="no" fi Should I add a dg-require-cxx11-abi ? FAIL: 20_util/allocator/overaligned.cc (test for excess errors) FAIL: ext/bitmap_allocator/overaligned.cc (test for excess errors) FAIL: ext/mt_allocator/overaligned.cc (test for excess errors) FAIL: ext/new_allocator/overaligned.cc (test for excess errors) FAIL: ext/pool_allocator/overaligned.cc (test for excess errors) Failures coming from always the same undefined symbols: /home/fdt/dev/gcc/build_git/x86_64-pc-linux-gnu/libstdc++-v3/include/ext/new_allocator.h:108: undefined reference to `operator new(unsigned long, std::align_val_t)' I don't understand those failures for now but same failures without patch so unrelated. FAIL: 26_numerics/gcd/gcd_neg.cc (test for excess errors) FAIL: 26_numerics/lcm/lcm_neg.cc (test for excess errors) Wrong line numbers of expected static asserts. I will fix those if not already done. FAIL: libstdc++-prettyprinters/cxx11.cc print efl ... Of course many pretty printers failures. IMO should be set as unsupported in this mode but I don't know how to do so. François On 06/10/2016 18:06, Jonathan Wakely wrote: > On 01/10/16 14:22 +0200, François Dumont wrote: >> On 30/09/2016 17:40, Jonathan Wakely wrote: >>> On 29/09/16 21:59 +0200, François Dumont wrote: >>>> Hi >>>> >>>> I think _GLIBCXX_BEGIN_NAMESPACE_ALGO should default to >>>> _GLIBCXX_BEGIN_NAMESPACE_VERSION when parallel mode is not active. >>>> Same for _GLIBCXX_BEGIN_NAMESPACE_CONTAINER, no ? >>> >>> Hmm, yes, I think this is correct, otherwise we're missing the VERSION >>> namespace in normal mode. But it seems we've always been missing it >>> since those macros were introduced in GCC 4.6 so I'd like to >>> investigate the consequences for gnu-versioned-namespace more >>> carefuly. >>> >>>> * include/bits/c++config (_GLIBCXX_BEGIN_NAMESPACE_ALGO) >>>> (_GLIBCXX_END_NAMESPACE_ALGO): Default to respectively >>>> _GLIBCXX_BEGIN_NAMESPACE_VERSION and _GLIBCXX_END_NAMESPACE_VERSION >>>> when parallel mode is not active. >>>> (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER, >>>> _GLIBCXX_END_NAMESPACE_CONTAINER): >>>> Likewise. >>>> >>>> Ok to commit after normal check ? Should I rebuild library with >>>> versioned namespace activated ? >>> >>> Any change affecting the NAMESPACE_VERSION macros should be tested >>> with the gnu-versioned-namespace, since those macros are only used for >>> that mode. >>> >>> But it can't be tested currently, see PR 77794. So let's wait until >>> I've fixed 77794, when we can test it. >>> >>> >> The reason I am proposing this is that if my debug algos patch is >> applied a lot of algos won't be in versionned namespace anymore. >> >> Broken for broken I might apply it even if not really tested, no ? > > It can be tested now, I've fixed PR 77794. > > > diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index 656ef78..ebabcd5 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -358,6 +358,10 @@ namespace std namespace _GLIBCXX_STD_C { _GLIBCXX_BEGIN_NAMESPACE_VERSION # define _GLIBCXX_END_NAMESPACE_CONTAINER \ _GLIBCXX_END_NAMESPACE_VERSION } +#else +# define _GLIBCXX_STD_C std +# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _GLIBCXX_BEGIN_NAMESPACE_VERSION +# define _GLIBCXX_END_NAMESPACE_CONTAINER _GLIBCXX_END_NAMESPACE_VERSION #endif #ifdef _GLIBCXX_PARALLEL @@ -366,30 +370,10 @@ namespace std namespace _GLIBCXX_STD_A { _GLIBCXX_BEGIN_NAMESPACE_VERSION # define _GLIBCXX_END_NAMESPACE_ALGO \ _GLIBCXX_END_NAMESPACE_VERSION } -#endif - -#ifndef _GLIBCXX_STD_A +#else # define _GLIBCXX_STD_A std -#endif - -#ifndef _GLIBCXX_STD_C -# define _GLIBCXX_STD_C std -#endif - -#ifndef _GLIBCXX_BEGIN_NAMESPACE_ALGO -# define _GLIBCXX_BEGIN_NAMESPACE_ALGO -#endif - -#ifndef _GLIBCXX_END_NAMESPACE_ALGO -# define _GLIBCXX_END_NAMESPACE_ALGO -#endif - -#ifndef _GLIBCXX_BEGIN_NAMESPACE_CONTAINER -# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER -#endif - -#ifndef _GLIBCXX_END_NAMESPACE_CONTAINER -# define _GLIBCXX_END_NAMESPACE_CONTAINER +# define _GLIBCXX_BEGIN_NAMESPACE_ALGO _GLIBCXX_BEGIN_NAMESPACE_VERSION +# define _GLIBCXX_END_NAMESPACE_ALGO _GLIBCXX_END_NAMESPACE_VERSION #endif // GLIBCXX_ABI Deprecated