From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 415603971C1A for ; Thu, 14 Jan 2021 17:15:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 415603971C1A Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-8-Zmg51KS0NMKZR4USu0QVhA-1; Thu, 14 Jan 2021 12:15:50 -0500 X-MC-Unique: Zmg51KS0NMKZR4USu0QVhA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 11B76806672; Thu, 14 Jan 2021 17:15:49 +0000 (UTC) Received: from localhost (unknown [10.33.37.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id A00335D734; Thu, 14 Jan 2021 17:15:48 +0000 (UTC) Date: Thu, 14 Jan 2021 17:15:47 +0000 From: Jonathan Wakely To: =?iso-8859-1?Q?Fran=E7ois?= Dumont Cc: "libstdc++@gcc.gnu.org" , gcc-patches Subject: Re: [PATCH] libstdc++/98466 Fix _GLIBCXX_DEBUG N3644 integration Message-ID: <20210114171547.GJ7692@redhat.com> References: <9c1f5008-1ded-fed1-bc57-309ec74b9c77@gmail.com> <20210114171003.GI7692@redhat.com> MIME-Version: 1.0 In-Reply-To: <20210114171003.GI7692@redhat.com> X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, BODY_8BITS, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 17:15:55 -0000 On 14/01/21 17:10 +0000, Jonathan Wakely wrote: >On 01/01/21 18:51 +0100, François Dumont via Libstdc++ wrote: >>I think the PR is not limited to unordered containers iterator, it >>impacts all _GLIBCXX_DEBUG iterators. >> >>However unordered containers local_iterator was more complicated to >>handle. Because of c++/65816 I prefer to review >>_Node_iterator_default constructor to set _M_cur to nullptr even if >>in principle it is not necessary except for the _Local_iterator_base >>constructor when hash code is not cached. >> >>    libstdc++: Implement N3644 for _GLIBCXX_DEBUG iterators >> >>    libstdc++-v3/ChangeLog >> >>            PR libstdc++/98466 >>            * include/bits/hashtable_policy.h >>(_Node_iterator_base()): Set _M_cur to nullptr. >>            (_Node_iterator()): Make default. >>            (_Node_const_iterator()): Make default. >>            * include/debug/macros.h >>(__glibcxx_check_erae_range_after): Add _M_singular >>            iterator checks. >>            * include/debug/safe_iterator.h >>            (_GLIBCXX_DEBUG_VERIFY_OPERANDS): Accept if both >>iterator are value initialized. >>            * include/debug/safe_local_iterator.h >>(_GLIBCXX_DEBUG_VERIFY_OPERANDS): >>            Likewise. >>            * include/debug/safe_iterator.tcc >>(_Safe_iterator<>::_M_valid_range): Add >>            _M_singular checks on input iterators. >>            * src/c++11/debug.cc >>(_Safe_iterator_base::_M_can_compare): Remove _M_singular >>            checks. >>            * testsuite/23_containers/deque/debug/98466.cc: New test. >>            * testsuite/23_containers/unordered_map/debug/98466.cc: >>New test. >> >>Tested under Linux x86_64 normal and debug mode. >> >>Ok to commit ? > >Yes, thanks. I've just realised that this C++14 change used to be noted in the C++14 status table: N3644 Null Forward Iterators Partial Only affects Debug Mode But I removed that last year when replacing the list of proposals with the Table of Contents taken from the standard, in commit 57ede05c6a0b443943e312bf205cb79233c9396f (oops!) For the branches we should either document that missing feature in a note, or backport your fix in a few weeks.