[patch] libstdc++/69945 Add __gnu_cxx::__freeres hook

2016-02-24 Thread Jonathan Wakely
hemselves? [ Aside: should the actual pool be created with placement-new to [ ensure it doesn't ever get destroyed? [ [ alignas(pool) unsigned char poolbuf[sizeof(pool)]; [ pool& emergency_pool = *::new(poolbuf) pool; commit 40fed1db72b0a4852d5890c2c464a0baabb02b74 Author: Jonathan

Re: [patch] libstdc++/69945 Add __gnu_cxx::__freeres hook

2016-02-25 Thread Jonathan Wakely
On 25/02/16 10:36 +0100, Richard Biener wrote: On Wed, Feb 24, 2016 at 7:35 PM, Jonathan Wakely wrote: This adds a new function to libsupc++ which will free the memory still in use by the pool used for allocating exceptions when malloc fails. This is similar to glibc's __libc_freeres,

Re: [PATCH] Fix detection of setrlimit in libstdc++ testsuite

2016-03-04 Thread Jonathan Wakely
On 02/03/16 09:38 -0800, Mike Stump wrote: On Mar 2, 2016, at 2:08 AM, Maxim Kuvyrkov wrote: PING ^ 2. The patch is sitting without comments for 4+ months. So the libstdc++ people are usually pretty active and responsive, I usually let them review these sorts of patches as domain experts.

Re: [v3] Fix ext/random/hypergeometric_distribution/operators/values.cc on Solaris 9

2013-11-27 Thread Jonathan Wakely
On 27 November 2013 14:14, Rainer Orth wrote: > > Ok for mainline? OK, thanks.

Re: [patch] Remove empty directories

2013-11-29 Thread Jonathan Wakely
On 29 November 2013 14:20, Ed Smith-Rowland wrote: > On 11/29/2013 08:38 AM, Matthias Klose wrote: >> >> trunk has some empty directories. ok to remove? >> >> gcc/testsuite/go.test/test/fixedbugs/bug478.dir >> libstdc++-v3/testsuite/experimental/string_view/requirements/exception >> libstdc++-v3/te

[v3 patch] fix formatting in doxygen comment

2013-12-03 Thread Jonathan Wakely
2013-12-03 Jonathan Wakely * include/std/fstream (basic_filebuf::open): Use preformatted text for table in Doxygen comment. Tested x86_64-linux. Committed to trunk. commit 8699304a9d3261d2b52636ee46c0203538de8fa1 Author: Jonathan Wakely Date: Tue Dec 3 12:40:46 2013 +

Re: 3 libstdc++ tests fail at random

2013-12-08 Thread Jonathan Wakely
hread could wake up and check for readiness before the shared state had been made ready. Fixed by this patch. Tested x86_64-linux and i686-linux, committed to trunk. 2013-12-08 Jonathan Wakely * testsuite/30_threads/async/async.cc: Fix race condition in test. commit 2141b30307e7802625e7

Re: RFA: revert libstdc++ r205810: simulator workload increase caused regression

2013-12-15 Thread Jonathan Wakely
On Dec 15, 2013 6:57 AM, "Hans-Peter Nilsson" wrote: > > From the revision range 205803:205810 (excluding:including) an > on, my autotester for cris-elf reports a regression: > > Running > /tmp/hpautotest-gcc1/gcc/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp > ... > WARNING: program timed

Re: RFA: revert libstdc++ r205810: simulator workload increase caused regression

2013-12-16 Thread Jonathan Wakely
(Sorry for my very brief reply the other day, I was on my phone and so using gmail is a pain.) On 16 December 2013 04:22, Hans-Peter Nilsson wrote: >> From: Hans-Peter Nilsson >> Date: Sun, 15 Dec 2013 15:20:48 +0100 > >> +// { dg-options "-std=gnu++0x -DSAMPLES=3" { target { { arm*-* } && >

Re: Add const char* constructors for exception classes in

2013-12-18 Thread Jonathan Wakely
On 19 December 2013 00:10, Oleg Endo wrote: > Hello, > > When writing code such as > ... > throw std::logic_error ("cold coffee"); > ... > currently the construction of std::string happens in the code that > throws the exception, which results in code bloat. Implementing the > const char* constr

Re: RFA: fix libstdc++ regression, simulator timeout from r205810

2013-12-22 Thread Jonathan Wakely
On 20 December 2013 01:12, Hans-Peter Nilsson wrote: > Here's a patch that splits up 20_util/hash/chi2_quality.cc *and* > increases some of the iteration numbers for simulator targets to > something that passes for all working targets mentioned below. > I am a bit worried about the stability of the

Re: [v3] Update Solaris baselines

2014-01-06 Thread Jonathan Wakely
On 6 January 2014 14:10, Rainer Orth wrote: > Since the GCC 4.9.0 release is approaching, we should update the Solaris > baselines again. > > This patch does just that, bootstrapped without regressions on the full > rang of Solaris configurations ({i386,sparc}-*-solaris2.{9,10,11}). > > Ok for main

Re: std::vector move assign patch

2014-01-07 Thread Jonathan Wakely
On 7 January 2014 21:12, François Dumont wrote: > I saw on another thread that 4.9 release was getting closer. Applying this > patch sounds like a good idear for this release. > > Any feedback ? Yes, it's coming :-) I imagine most of us have been on holiday and are just getting back to speed, and

Re: [Patch] Regex bracket matcher cache optimization

2014-01-08 Thread Jonathan Wakely
On 7 January 2014 19:36, Tim Shen wrote: > > I didn't noticed that's so time consuming. I think reducing the > compile time is possible (by templating several member functions > instead of whole _Compiler<> class). Ouch! Yes, that's quite a bit slower, and this code is already very slow to compile

Re: std::vector move assign patch

2014-01-08 Thread Jonathan Wakely
On 27 December 2013 18:27, François Dumont wrote: > Hi > > Here is a patch to fix an issue in normal mode during the move > assignment. The destination vector allocator instance is moved too during > the assignment which is wrong. Thanks for your patience, the normal-mode fix is definitely cor

Re: Rb tree node recycling patch

2014-01-08 Thread Jonathan Wakely
On 27 December 2013 18:30, François Dumont wrote: > Hi > > Here is a patch to add recycling of Rb tree nodes when possible. The change looks good, but it is not a bug fix, so I don't think it's suitable for Stage 3. Please re-submit this after 4.9 is released when we are in Stage 1 again, tha

Re: std::vector move assign patch

2014-01-09 Thread Jonathan Wakely
;> I will be in vacation for a week starting today so if you want to apply it >> quickly do not hesitate to do it yourself. >> > > This caused: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59738 Fixed by the attached patch, tested x86_64-linux and committed to trunk

Re: PR 59712 patch

2014-01-09 Thread Jonathan Wakely
On 9 January 2014 21:55, François Dumont wrote: > > All unordered_* tests run under Linux x86_64. Please make sure you run the entire testsuite, not just the parts that seem relevant.

[patch] fix libstdc++/59680

2014-01-09 Thread Jonathan Wakely
PR libstdc++/59680 * src/c++11/thread.cc (__sleep_for): Fix call to ::sleep. Tested x86_64-linux, and tested again with a hacked c++config.h to use ::sleep(), committed to trunk. commit 3de5274663e0214b8c5335e99ef85f325f709840 Author: Jonathan Wakely Date: Thu Jan 9 14:33:20

[patch] fix docs (libstdc++/59698, libstdc++/59687, libstdc++/59699)

2014-01-10 Thread Jonathan Wakely
Three documentation bugs fixed by the attached patches 2014-01-10 Jonathan Wakely PR libstdc++/59698 * doc/xml/manual/status_cxx1998.xml (iso.1998.specific): Markup and stylistic improvements. * doc/xml/manual/codecvt.xml (std.localization.facet.codecvt): Likewise and

Re: [patch] make the libstdc++ pretty printers compatible with both Python 2 and Python3

2014-01-11 Thread Jonathan Wakely
On 31 October 2013 16:46, Tom Tromey wrote: >> "Matthias" == Matthias Klose writes: > > Matthias> Starting with gdb 7.6, gdb can be linked with both Python 2.x > Matthias> and Python 3.x. Therefore the pretty printers should be > Matthias> compatible with both Python versions. > > Thanks for

Re: PR 59712 patch

2014-01-14 Thread Jonathan Wakely
On 9 January 2014 21:55, François Dumont wrote: > Hi > > Here is a patch for this small problem with clang. It is not a blocking > issue for the 4.9 release but at the same time it is a rather safe fix so > just tell me if I can commit it. > > All unordered_* tests run under Linux x86_64. I

Re: PR 59712 patch

2014-01-15 Thread Jonathan Wakely
On 14 January 2014 14:44, Jonathan Wakely wrote: > On 9 January 2014 21:55, François Dumont wrote: >> Hi >> >> Here is a patch for this small problem with clang. It is not a blocking >> issue for the 4.9 release but at the same time it is a rather safe fix so >>

Re: [patch] fixes -fcilkplus functionality on DragonFly (fixes ~2600 tests)

2015-07-11 Thread Jonathan Wakely
On 11 July 2015 at 06:46, Jeff Law wrote: > On 07/10/2015 06:34 PM, John Marino wrote: >> >> After posting the first testsuite results for DragonFly, it was clear >> that the -fcilkplus functionality was broken: >> https://gcc.gnu.org/ml/gcc-testresults/2015-07/msg01046.html >> >> The problem was r

Re: [PATCH] libstdc++ os_defines now required for DragonFly

2015-07-13 Thread Jonathan Wakely
On 06/07/15 15:57 +0200, John Marino wrote: On the development branch of DragonFly BSD, it was discovered that __LONG_LONG_SUPPORTED was accidently unconditionally defined. This had a positive side effect of allowing GCC conftests to pass for C99 support via wchar.h. When the bug was fixed, the

[v3 patch] Remove __gnu_cxx::__alloc_traits::_S_nothrow_swap()

2015-07-13 Thread Jonathan Wakely
his also adds a _GLIBCXX_NOEXCEPT_IF macro for helping to define conditional noexcept guarantees. Tested powerpc64le-linux, committed to trunk. commit 54d85a21c3b1c94d1bf28bc095ae9d373e180802 Author: Jonathan Wakely Date: Sat Jul 11 12:13:09 2015 +0100 * include/bits/c++config (_GLIBCXX_NOEXC

[patch] libstdc++/66855 ignore endianness in codecvt_utf8_utf16

2015-07-13 Thread Jonathan Wakely
e. commit e35e03773955a618cba43fcef4b1559ba9a27d8c Author: Jonathan Wakely Date: Mon Jul 13 19:38:58 2015 +0100 PR libstdc++/66855 * src/c++11/codecvt.cc (__codecvt_utf8_utf16_base::do_in): Override endianness bit in mode. * testsuite/22_locale/codecvt/codecvt_utf8_utf16/66855.cc: New. di

[patch] Document that std::thread::native_handle() and similar are not portable or stable

2015-07-17 Thread Jonathan Wakely
This just adds a caveat to the docs that the semantics of native_handles should not be relied on. Committed to trunk. commit 46e6c523b7d2d38cc3b31b77a19639f4b2634671 Author: Jonathan Wakely Date: Fri Jul 17 17:07:30 2015 +0100 * doc/xml/manual/status_cxx2011.xml: Add caveats for

[patch] Fix wrong URL for N4279 in libstdc++ manual.

2015-07-19 Thread Jonathan Wakely
Committed to trunk. commit bfd6e14c25de5e2f97dd1ab037a53b35df4f Author: Jonathan Wakely Date: Sun Jul 19 19:31:16 2015 +0100 * doc/xml/manual/status_cxx2017.xml: Fix URL for N4279. * doc/html/manual/status.html: Regenerate. diff --git a/libstdc++-v3/doc/xml/manual

Re: [GSoC] Patches for shared_ptr array and polymorphic_allocator

2015-07-20 Thread Jonathan Wakely
On 18/07/15 00:02 -0700, Tim Shen wrote: On Fri, Jul 17, 2015 at 7:16 PM, Fan You wrote: Hi, According to Here is my implementation of [8.2] Extend shared_ptr to support arrays Please don't resend the sha

[doc patch] Rename "Language Independent Options" @node in invoke.texi

2015-07-21 Thread Jonathan Wakely
nu.org/onlinedocs/gcc/Invoking-GCC.html#Invoking-GCC node, as you'd have to click through to another page to see the sub-sections. OK for trunk? commit e3b0376e0440e8af4768b1e1502a57f9ca36be53 Author: Jonathan Wakely Date: Tue Jul 21 13:37:16 2015 +0100 * doc/invoke.texi (Language

Re: [doc patch] Rename "Language Independent Options" @node in invoke.texi

2015-07-21 Thread Jonathan Wakely
On 21/07/15 09:07 -0600, Sandra Loosemore wrote: On 07/21/2015 06:52 AM, Jonathan Wakely wrote: This texinfo @node seems misnamed: https://gcc.gnu.org/onlinedocs/gcc/Language-Independent-Options.html#Language-Independent-Options It should be something like "Diagnostic Message Forma

Re: libstdc++: more __intN tweaks

2015-07-23 Thread Jonathan Wakely
On 22/07/15 22:26 -0400, DJ Delorie wrote: Another place where a list of "all" types are explicitly listed, and the __intN types need to be included, and elsewhere protection against errors [-Wnarrowing] on targets that have small size_t. Ok? * include/bits/functional_hash.h: Add speci

Re: __atomic_futex_unsigned::_M_load_when_not_equal has a 'return' statement with no value, in function returning unsigned int

2015-07-24 Thread Jonathan Wakely
On 23/07/15 23:54 +0200, Torvald Riegel wrote: On Thu, 2015-07-23 at 09:21 +0100, Jonathan Wakely wrote: On 22/07/15 22:30 -0400, Patrick Palka wrote: >Specifically, line 149 of atomix_futex.h has a bare "return;" >statement, but the function is marked as returning non-void.

Re: [libstdc++/67015, patch] Fix regex POSIX bracket parsing

2015-07-27 Thread Jonathan Wakely
On 26/07/15 05:20 -0700, Tim Shen wrote: @@ -389,7 +391,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif } - void + _StringT _M_add_collating_element(const _StringT& __s) { auto __st = _M_traits.lookup_collatename(__s.data(), Changing this return type is an ABI

Re: [libstdc++/67015, patch] Fix regex POSIX bracket parsing

2015-07-28 Thread Jonathan Wakely
On 27/07/15 19:40 -0700, Tim Shen wrote: Done by s/_M_add_collating_element/_M_add_collate_element/. Great, thanks. OK for trunk and gcc-5-branch.

Re: [Patch] Small refactor on _State<>

2015-07-28 Thread Jonathan Wakely
On 26/07/15 13:38 -0700, Tim Shen wrote: On Sat, Jul 25, 2015 at 8:31 AM, Jonathan Wakely wrote: On 25/07/15 00:11 -0700, Tim Shen wrote: It's not a very necessary refactoring, but simply can't resist. :) I'm not sure of the ::memcpy calls. It looks not very idiomatic, but st

Re: [Patch] Small refactor on _State<>

2015-07-29 Thread Jonathan Wakely
On 28/07/15 16:19 +0100, Jonathan Wakely wrote: What I'm concerned about is assignment. You haven't defined an assignment operator. If there's an unwanted assignment we could get undefined behaviour. Please delete the assignment operator if it's not needed. Apologies, you

Re: [libstdc++/67015, patch] Fix regex POSIX bracket parsing

2015-07-29 Thread Jonathan Wakely
On 28/07/15 21:44 -0700, Tim Shen wrote: On Tue, Jul 28, 2015 at 3:27 AM, Jonathan Wakely wrote: On 27/07/15 19:40 -0700, Tim Shen wrote: Done by s/_M_add_collating_element/_M_add_collate_element/. Great, thanks. OK for trunk and gcc-5-branch. Committed. Is there no need for gcc-4_9

Re: [libstdc++/67015, patch] Fix regex POSIX bracket parsing

2015-07-29 Thread Jonathan Wakely
On 29/07/15 01:56 -0700, Tim Shen wrote: If 4.9 is `stable` and expected to be experimetal, which by my definition should only include important changes, we may leave it as is? Yes, let's not change the 4.9 version.

Re: [Patch] Small refactor on _State<>

2015-07-29 Thread Jonathan Wakely
On 29/07/15 01:43 -0700, Tim Shen wrote: On Wed, Jul 29, 2015 at 1:32 AM, Jonathan Wakely wrote: Apologies, you have a user-declared move constructor, so assignment is already deleted. It wouldn't hurt to make that explicit though: I'm just bad at memorizing when they are implicitl

Re: [v3 PATCH] PR libstdc++/60970, implement LWG 2148

2015-07-29 Thread Jonathan Wakely
4d0df9f044b72cb172336915 Author: Jonathan Wakely Date: Wed Jul 29 11:09:52 2015 +0100 2015-07-29 Ville Voutilainen PR libstdc++/60970 * include/bits/functional_hash.h (__hash_enum): New. (hash): Derive from __hash_enum. * testsuite/20_util/hash/60970.cc: New. diff --

Re: [v3 PATCH] Implement N4280, Non-member size() and more (Revision 2)

2015-07-29 Thread Jonathan Wakely
On 15/07/15 02:49 +0300, Ville Voutilainen wrote: Tested on Linux-PPC64. Committed to trunk with some whitespace changes.

[patch] libstdc++/66829 use -std=gnu++98 to compile testsuite_shared.cc

2015-07-29 Thread Jonathan Wakely
641f48dbc01bb134de1b99414b3ebb4f114d92c0 Author: Jonathan Wakely Date: Wed Jul 29 14:00:51 2015 +0100 PR libstdc++/66829 * testsuite/lib/libstdc++.exp (v3-build_support): Compile testsuite_shared.cc with -std=gnu++98. diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite

[v3 patch] Fix self-assignment in std::experimental::any

2015-07-30 Thread Jonathan Wakely
When I fixed any's copying of non-trivial types I broke the self-assignment case. This adds an explicit check for it. Thanks to Axel Menzel for noticing the bug. Tested ppc64le-linux, committed to trunk. commit 8a9db2d69b88c72ca0fd794c1058918069787f83 Author: Jonathan Wakely Date: Th

Re: [Patch] Small refactor on _State<>

2015-07-30 Thread Jonathan Wakely
On 29/07/15 21:55 -0700, Tim Shen wrote: - typedef _Matcher _MatcherT; + typedef _Matcher<_Char_type> _MatcherT; + static_assert(sizeof(_MatcherT) == sizeof(_Matcher), + "The aussmption std::function has " + "the same size as std::function is vio

Re: Add irreflexive comparison debug check

2015-07-30 Thread Jonathan Wakely
On 29/07/15 22:08 +0200, François Dumont wrote: Hi Here is a patch to add irreflexive debug check. Awesome! You can add PR libstdc++/60519 to the changelog. Standard algos signatures are such that there is no guaranty that the operator < or predicate to compare the iterator value typ

[v3 patch] Fix FAIL in experimental/filesystem/operations/current_path.cc

2015-07-30 Thread Jonathan Wakely
4948553fcf04e6d3255d6c440bfc82aac71cfbe3 Author: Jonathan Wakely Date: Thu Jul 30 13:32:15 2015 +0100 * testsuite/experimental/filesystem/operations/current_path.cc: Use canonical paths for comparisons. diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/current_path.cc b/libstdc++-v3

Re: Add irreflexive comparison debug check

2015-07-31 Thread Jonathan Wakely
On 31 July 2015 at 20:49, François Dumont wrote: > On 30/07/2015 12:30, Jonathan Wakely wrote: >> On 29/07/15 22:08 +0200, François Dumont wrote: >>>Standard algos signatures are such that there is no guaranty that >>> the operator < or predicate to compar

[patch] libstdc++/67078 change _N bad name in new container access functions

2015-08-03 Thread Jonathan Wakely
We can't use _N as an identifier, as per https://gcc.gnu.org/onlinedocs/libstdc++/manual/source_code_style.html Tested ppc64le-linux, committed to trunk. commit ae65b96cfb69c64d636f86d9f9154da2364e0440 Author: Jonathan Wakely Date: Mon Aug 3 16:29:44 2015 +0100 PR libstdc++/

Re: [PATCH, libstdc++, testsuite] Remove redundant -save-temps options

2015-08-05 Thread Jonathan Wakely
On 04/08/15 20:09 +0300, Nikolai Bozhenov wrote: Hi, the attached patch removes redundant -save-temps options from some libstdc++ tests, since the option is not needed in dg-do-compile/scan-assembler tests. Thanks, committed.

Re: Elimitate duplication of get_catalogs in different abi

2015-08-05 Thread Jonathan Wakely
On 30/07/15 21:57 +0200, François Dumont wrote: It seems that this patch results in unresolved symbols. I am quite sure that the code is right but build system should be adapted. I noticed that *_cow.cc files are built with -fimplicit-templates. I try to apply the same with the old abi but I st

Re: debug mode symbols cleanup

2015-09-15 Thread Jonathan Wakely
On 14/09/15 20:26 +0200, François Dumont wrote: On 08/09/2015 22:47, François Dumont wrote: On 07/09/2015 13:03, Jonathan Wakely wrote: On 05/09/15 22:53 +0200, François Dumont wrote: I remember Paolo saying once that we were not guarantiing any abi compatibility for debug mode. I haven&#

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-16 Thread Jonathan Wakely
On 12/09/15 12:07 -0600, Martin Sebor wrote: On 09/12/2015 04:09 AM, Jonathan Wakely wrote: On 11 September 2015 at 18:39, Martin Sebor wrote: On 09/11/2015 08:21 AM, Jonathan Wakely wrote: Solaris 10 doesn't follow POSIX in accepting a null pointer as the second argument to realpath(

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-16 Thread Jonathan Wakely
On 16/09/15 15:42 +0100, Jonathan Wakely wrote: @@ -22,6 +22,8 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. +#define _XOPEN_SOURCE 700 + #include #include #include Unfortunately this completely breaks NetBSD, b

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-16 Thread Jonathan Wakely
On 16/09/15 17:02 +0100, Jonathan Wakely wrote: I don't know how to use _XOPEN_VERSION or _POSIX_VERSION to check for a suitable realpath without defining one of those feature-test macros, which then breaks other things. I suppose we could also define _NETBSD_SOURCE manually, whi

Re: [Patch, libstdc++] Add specific error message into exceptions

2015-09-16 Thread Jonathan Wakely
On 12/09/15 01:57 +, Tim Shen wrote: Ok then, let's not appending dynamic location string, but only throw a string literal pointer. This looks great, and a *huge* improvement on the current errors even without more precise location info. OK for trunk, thanks very much for doing this.

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-16 Thread Jonathan Wakely
r filesystem tests, removing it if it already exists. Then the tests can put anything they like in that new dir without fear of trashing the user's files elsewhere on the FS! That shouldn't be too hard to do, it's just a Simple Matter Of Programming. And finding time. comm

Re: vector lightweight debug mode

2015-09-16 Thread Jonathan Wakely
On 16/09/15 21:37 +0200, François Dumont wrote: On 14/09/2015 21:50, Jonathan Wakely wrote: On 14/09/15 20:27 +0200, François Dumont wrote: diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h index 305d446..89a9aec 100644 --- a/libstdc++-v3/include/bits

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-16 Thread Jonathan Wakely
On 16/09/15 16:04 -0600, Martin Sebor wrote: Tested powerpc64le-linux, x86_64-dragonfly4.1 and x86_64-netbsd5.1, do you see any reason not to commit this for now? I see only a couple of potential problems: a missing test for PATH_MAX in the unlikely event it's not defined (or is obscenely In

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-16 Thread Jonathan Wakely
On 16/09/15 19:58 +0100, Jonathan Wakely wrote: commit ef25038796485298ff8f040bc79e0d9a371171fa Author: Jonathan Wakely Date: Wed Sep 16 18:07:32 2015 +0100 Implement filesystem::canonical() without realpath PR libstdc++/67173 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-17 Thread Jonathan Wakely
On 16/09/15 17:42 -0600, Martin Sebor wrote: I see now the first exists test will detect symlink loops in the original path. But I'm not convinced there isn't a corner case that's subject to a TOCTOU race condition between the first exists test and the while loop during which a symlink loop can b

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-17 Thread Jonathan Wakely
On 17/09/15 12:16 +0100, Jonathan Wakely wrote: So if we use a counter, what's a sane maximum? Is MAXSYMLINKS in the value the kernel uses? 20 seems quite low, I was thinking of a much higher number. Until very recently Linux seemed to hardcode it to 40: https://github.com/torvalds/linux

[patch] libstdc++/65913 Handle alignment in __atomic_is_lock_free

2015-09-17 Thread Jonathan Wakely
bject. libstdc++-v3: 2015-09-17 Jonathan Wakely PR libstdc++/65913 * include/bits/atomic_base.h (__atomic_base<_TTp>::is_lock_free(), __atomic_base<_PTp*>::is_lock_free()): Call the built-in with the immediate pointer value, not a variable.

Re: [PATCH] start of rewrite of unordered_{set,map}

2015-09-17 Thread Jonathan Wakely
Oops, I meant to reply to the lists, not just Geoff ... On 16/09/15 18:35 +0100, Jonathan Wakely wrote: On 16/09/15 10:08 -0700, Geoff Pike wrote: Also, to clarify, I am primarily seeking high-level comments; I am new here and don't want to waste anybody's time. Hi Geoff, This

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-17 Thread Jonathan Wakely
On 17/09/15 12:16 +0100, Jonathan Wakely wrote: On 16/09/15 17:42 -0600, Martin Sebor wrote: I see now the first exists test will detect symlink loops in the original path. But I'm not convinced there isn't a corner case that's subject to a TOCTOU race condition between the fi

[patch] Only do shrink_to_fit() when exceptions enabled

2015-09-17 Thread Jonathan Wakely
13cf19282acf42a52d5eacd2c293a944bd3e5ebe Author: Jonathan Wakely Date: Thu Sep 17 00:07:33 2015 +0100 Only do shrink_to_fit() when exceptions enabled * include/bits/allocator.h (__shrink_to_fit_aux::_S_do_it): Do nothing if exceptions are disabled. * include/bits/basic_string.h

[patch] Remove redundant conditional expressions in

2015-09-17 Thread Jonathan Wakely
This is silly and makes it harder to read: return _M_value != 0 ? true : false; Tested powerpc64le-linux, committed to trunk. commit ca8d1e0e92810ac72b337247c10af1de1de465d4 Author: Jonathan Wakely Date: Thu Sep 17 15:07:24 2015 +0100 Remove redundant conditional expressions in

Re: [patch] libstdc++/65142 Check read() result in std::random_device.

2015-09-17 Thread Jonathan Wakely
On 15/09/15 12:47 +0100, Jonathan Wakely wrote: On 11/09/15 14:44 +0100, Jonathan Wakely wrote: We should not silently ignore a failure to read from the random device. Tested powerpc64le-linux, committed to trunk. I'm going to commit this to the gcc-5 branch too. c

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-17 Thread Jonathan Wakely
On 16/09/15 23:50 +0100, Jonathan Wakely wrote: On 16/09/15 19:58 +0100, Jonathan Wakely wrote: commit ef25038796485298ff8f040bc79e0d9a371171fa Author: Jonathan Wakely Date: Wed Sep 16 18:07:32 2015 +0100 Implement filesystem::canonical() without realpath PR libstdc++/67173

Re: [patch] libstdc++/65142 Check read() result in std::random_device.

2015-09-17 Thread Jonathan Wakely
On 17/09/15 22:21 +0200, Gerald Pfeifer wrote: On Thu, 17 Sep 2015, Jonathan Wakely wrote: Any comments on this version? Committed to trunk. Unfortunately this broke bootstrap on FreeBSD 10.1. /scratch/tmp/gerald/gcc-HEAD/libstdc++-v3/src/c++11/random.cc: In member function 

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-17 Thread Jonathan Wakely
On 17/09/15 21:25 +0200, Andreas Schwab wrote: Jonathan Wakely writes: + p = "/dev/stdin"; + if (exists(p)) +{ + auto p2 = canonical(p); + if (is_symlink(p)) +VERIFY( p != p2 ); + else +VERIFY( p == p2 ); + VERIFY( canonical(p2) == p2 );

Re: [patch] libstdc++/65142 Check read() result in std::random_device.

2015-09-17 Thread Jonathan Wakely
On 17/09/15 22:32 +, Moore, Catherine wrote: -Original Message- From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- ow...@gcc.gnu.org] On Behalf Of Jonathan Wakely Sent: Thursday, September 17, 2015 5:28 PM To: Gerald Pfeifer Cc: libstd...@gcc.gnu.org; gcc-patches@gcc.gnu.org

Re: debug mode symbols cleanup

2015-09-18 Thread Jonathan Wakely
On 18/09/15 13:00 +0200, Ulrich Weigand wrote: Francois Dumont wrote: * include/debug/formatter.h (_Error_formatter::_Parameter::_M_print_field): Delete. (_Error_formatter::_Parameter::_M_print_description): Likewise. (_Error_formatter::_M_format_word): Likewise. (_Error_for

Re: [patch] libstdc++/64857 Rationalise PCH headers and 17_intro/headers tests.

2015-09-18 Thread Jonathan Wakely
On 11/09/15 13:25 +0100, Jonathan Wakely wrote: diff --git a/libstdc++-v3/include/precompiled/extc++.h b/libstdc++-v3/include/precompiled/extc++.h index de3775b..8883e47 100644 --- a/libstdc++-v3/include/precompiled/extc++.h +++ b/libstdc++-v3/include/precompiled/extc++.h @@ -28,15 +28,25

[PATCH] Use stdint-wrap.h on *-*-netbsd[56]*

2015-09-18 Thread Jonathan Wakely
/ChangeLog b/gcc/ChangeLog index affc5ba..9450dcb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2015-09-16 Jonathan Wakely + + * config.gcc (*-*-netbsd[5-6]*): Set use_gcc_stdint=wrap. + 2015-09-15 Alan Lawrence * config/aarch64/aarch64-simd.md diff --git a

Re: Fwd: [PATCH] Enable libstdc++ numeric conversions on Cygwin

2015-09-18 Thread Jonathan Wakely
On 18/09/15 11:17 -0400, Jennifer Yao wrote: A number of functions in libstdc++ are guarded by the _GLIBCXX_USE_C99 preprocessor macro, which is only defined on systems that pass all of the checks for a large set of C99 functions. Consequently, on systems which lack any of the required C99 facili

Re: vector lightweight debug mode

2015-09-19 Thread Jonathan Wakely
On 17 September 2015 at 21:52, Christopher Jefferson wrote: > -- Forwarded message -- > From: Christopher Jefferson > Date: 17 September 2015 at 18:59 > Subject: Re: vector lightweight debug mode > To: Jonathan Wakely > > > On 16 September 2015 at 21:29

Re: vector lightweight debug mode

2015-09-19 Thread Jonathan Wakely
On 19 September 2015 at 08:31, François Dumont wrote: > On 16/09/2015 22:29, Jonathan Wakely wrote: >> No, because it is undefined to compare iterators that belong to >> different containers, or to compare pointers that point to different >> arrays. >> > >

Re: vector lightweight debug mode

2015-09-19 Thread Jonathan Wakely
On 19 September 2015 at 10:12, Jonathan Wakely wrote: > On 19 September 2015 at 08:31, François Dumont wrote: >> On 16/09/2015 22:29, Jonathan Wakely wrote: >>> No, because it is undefined to compare iterators that belong to >>> different containers, or to compare point

Re: [patch] Only do shrink_to_fit() when exceptions enabled

2015-09-21 Thread Jonathan Wakely
Oops. Bootstrapped with --disable-libstdcxx-dual-abi on x86_64-linux, committed to trunk. commit 9b9d9e3a5921f9a5225b466ce9d07b42b72f54dd Author: Jonathan Wakely Date: Mon Sep 21 11:58:41 2015 +0100 Fix bootstrap error introduced in r227870 PR libstdc++/67647 * include

Re: Fwd: [PATCH] Enable libstdc++ numeric conversions on Cygwin

2015-09-21 Thread Jonathan Wakely
On 19/09/15 15:55 -0400, Jennifer Yao wrote: Do you already have a copyright assignment for GCC? If not, would you be willing to complete one? No, but I would be willing to complete one, yes. Are you willing to send me the appropriate forms, or should I contact someone else? Great, I'll send

[v3 patch] Fix filesystem::create_directories() function

2015-09-23 Thread Jonathan Wakely
This function wasn't working properly (testing is useful!) Tested x86_64-linux, powerpc64le-linux and x86_64-dragonfly4.1, committed to trunk. commit 9f9ee62dc3e3d5a1cc825298b93afedc2eaf0aeb Author: Jonathan Wakely Date: Tue Sep 22 23:43:59 2015 +0100 Fix filesystem::create_direct

[v3 patch] Fix Filesystem TS directory iterators

2015-09-23 Thread Jonathan Wakely
trunk. commit 8d08e1c6724cb433e1ca4f975ce85bd277ba2389 Author: Jonathan Wakely Date: Wed Sep 23 00:28:19 2015 +0100 Fix semantics of Filesystem TS directory iterators [class.directory_iterator] p4 and [directory_iterator.members] p4 require that only the default constructor and ignored permission denied

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-23 Thread Jonathan Wakely
On 17/09/15 09:37 -0600, Martin Sebor wrote: On 09/17/2015 05:16 AM, Jonathan Wakely wrote: On 16/09/15 17:42 -0600, Martin Sebor wrote: I see now the first exists test will detect symlink loops in the original path. But I'm not convinced there isn't a corner case that's subj

[patch] Reduce space and time overhead of std::thread

2015-09-23 Thread Jonathan Wakely
it exports some new symbols, and we have to keep the old code for backwards compatibility, but I think it's worth doing. Does anybody disagree? commit 2d7e89aae8ac12dd7a6b2083e5169679c1200cc5 Author: Jonathan Wakely Date: Thu Mar 12 13:23:23 2015 + Reduce space and time overhe

[patch] libstdc++/67707 Leave moved-from std::deque in a valid state

2015-09-24 Thread Jonathan Wakely
to trunk. This needs to be backported to gcc-5-branch too. commit 386b9e9d927e5d0bcca8815b6219581ea58723bf Author: Jonathan Wakely Date: Thu Sep 24 16:10:27 2015 +0100 Leave moved-from std::deque in a valid state PR libstdc++/67707 * include/bits/stl_deque.h (_D

Re: New power of 2 hash policy

2015-09-25 Thread Jonathan Wakely
On 24/09/15 22:08 +0200, François Dumont wrote: Working on it I realised that despite the comment on _M_next_bkt saying "no smaller than n" the method can return a value smaller for big n values. This is not likely to happen but I prefer to take care of it. I just make sure we won't try to reh

Re: Elimitate duplication of get_catalogs in different abi

2015-09-25 Thread Jonathan Wakely
On 23/09/15 21:28 +0200, François Dumont wrote: On 05/09/2015 23:02, François Dumont wrote: On 22/08/2015 14:24, Daniel Krügler wrote: 2015-08-21 23:11 GMT+02:00 François Dumont : I think I found a better way to handle this problem. It is c++locale.cc that needs to be built with --fimplicit-te

Re: Elimitate duplication of get_catalogs in different abi

2015-09-25 Thread Jonathan Wakely
On 25/09/15 16:08 +0100, Jonathan Wakely wrote: On 23/09/15 21:28 +0200, François Dumont wrote: On 05/09/2015 23:02, François Dumont wrote: On 22/08/2015 14:24, Daniel Krügler wrote: 2015-08-21 23:11 GMT+02:00 François Dumont : I think I found a better way to handle this problem. It is c

Re: [v3 PATCH] Avoid creating dangling references in case of nested tuples for tuple constructors that construct from other tuples.

2015-09-25 Thread Jonathan Wakely
On 25/09/15 12:38 +0300, Ville Voutilainen wrote: Tested on Linux-PPC64. 2015-09-25 Ville Voutilainen Avoid creating dangling references in case of nested tuples for tuple constructors that construct from other tuples. * include/std/tuple (_TC::_NonNestedTuple): New. * include/st

Re: Elimitate duplication of get_catalogs in different abi

2015-09-25 Thread Jonathan Wakely
On 25/09/15 16:10 +0100, Jonathan Wakely wrote: On 25/09/15 16:08 +0100, Jonathan Wakely wrote: On 23/09/15 21:28 +0200, François Dumont wrote: On 05/09/2015 23:02, François Dumont wrote: On 22/08/2015 14:24, Daniel Krügler wrote: 2015-08-21 23:11 GMT+02:00 François Dumont : I think I found

Re: [patch] Enable lightweight checks with _GLIBCXX_ASSERTIONS.

2015-09-26 Thread Jonathan Wakely
On 14/09/15 11:57 +0200, Florian Weimer wrote: On 09/10/2015 06:57 PM, Martin Sebor wrote: There is quite a bit of documentation of _FORTIFY_SOURCE that explains its effect on user code. I think there are only random blog articles discussing aspects of it, most of them slightly incorrect or o

Re: [patch] Enable lightweight checks with _GLIBCXX_ASSERTIONS.

2015-09-27 Thread Jonathan Wakely
On 26/09/15 22:49 +0200, Florian Weimer wrote: On 09/26/2015 09:52 PM, Jonathan Wakely wrote: Would changes like this be suitable for _FORTIFY_SOURCE? diff --git a/libstdc++-v3/include/std/mutex b/libstdc++-v3/include/std/mutex index 5e5ced1..074bf26 100644 --- a/libstdc++-v3/include/std

[patch] libstdc++/67726 LWG 2135: terminate() in condition_variable::wait()

2015-09-28 Thread Jonathan Wakely
This was a change between C++11 and C++14. Tested powerpc64le-linux, committed to trunk. commit 023e16117005d8ca7dbb0e2e61059b59d7cc0e40 Author: Jonathan Wakely Date: Mon Sep 28 17:47:35 2015 +0100 LWG 2135: terminate() in condition_variable::wait() * include/std

[patch] libstdc++/67747 Allocate space for dirent::d_name

2015-09-29 Thread Jonathan Wakely
nf to get NAME_MAX and allocates a buffer. Tested powerpc64le-linux and x86_64-dragonfly4.1, I'm going to commit this to trunk today (and backport all the filesystem fixes to gcc-5-branch). commit 16ff5d124b8e6c5d1f9dd4edb81b6ca5c9129134 Author: Jonathan Wakely Date: Tue Sep 29 11:58:19

Re: [PATCH] Use stdint-wrap.h on *-*-netbsd[56]*

2015-09-29 Thread Jonathan Wakely
Ping. On 18/09/15 13:59 +0100, Jonathan Wakely wrote: This patch adjust config.gcc so that it installs for NetBSD 5.x and 6.x, which is necessary for the C++ library because the host has: #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) #include #endif #if !defined(__cplusplus

[PATCH] Clarify __atomic_compare_exchange_n docs

2015-09-29 Thread Jonathan Wakely
idered to conform to" phrasing. (It's only _considered_ to? So does it or doesn't it use that memory order?) Instead I've used the terminology from the C and C++ standards, which say "memory is affected according to". OK for trunk? commit 370a92b7f4d318957a70d0d3f1185f

Re: [patch] Reduce space and time overhead of std::thread

2015-09-29 Thread Jonathan Wakely
On 23/09/15 17:18 +0100, Jonathan Wakely wrote: For PR 65393 I avoided some unnecessary shared_ptr copies while launching a std::thread. This goes further and avoids shared_ptr entirely, using unique_ptr instead. This reduces the memory overhead of a std::thread by 32 bytes (on 64-bit) and

[patch] libstdc++/67583 Fix invalid sputn calls in tests

2015-09-29 Thread Jonathan Wakely
trunk. commit 4f835652c412fbd0300c8b045a5836d116ff56c8 Author: Jonathan Wakely Date: Tue Sep 29 14:14:15 2015 +0100 PR libstdc++/67583 Fix invalid sputn calls in tests PR libstdc++/67583 * testsuite/27_io/basic_stringbuf/seekoff/char/1.cc: Fix sputn call with mismatched arguments.

<    11   12   13   14   15   16   17   18   19   20   >