From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26768 invoked by alias); 1 Sep 2017 09:10:45 -0000 Mailing-List: contact libstdc++-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libstdc++-owner@gcc.gnu.org Received: (qmail 26696 invoked by uid 89); 1 Sep 2017 09:10:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 01 Sep 2017 09:10:42 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 205DE3B724; Fri, 1 Sep 2017 09:10:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 205DE3B724 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jwakely@redhat.com Received: from localhost (unknown [10.33.36.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0991F932EE; Fri, 1 Sep 2017 09:10:38 +0000 (UTC) Date: Fri, 01 Sep 2017 09:10:00 -0000 From: Jonathan Wakely To: Petr Ovtchenkov Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [PATCH] streambuf_iterator: avoid debug-dependent behaviour Message-ID: <20170901091037.GW4582@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.8.3 (2017-05-23) X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg00000.txt.bz2 On 24/08/17 12:57 +0300, Petr Ovtchenkov wrote: >Explicit do sgetc from associated streambuf. Avoid debug-dependent >sgetc (within _M_at_eof()): > > __glibcxx_requires_cond(!_M_at_eof(), > _M_message(__gnu_debug::__msg_inc_istreambuf) > ._M_iterator(*this)); > >Increment operators not require not-eof precoditions. > >Don't unlink associated streambuf if eof detected (in _M_get). > >Clean logic in postfix increment operator. I find it very hard to understand the reasons for this patch. What you've written above is too terse for me. Are you fixing a bug? If so, do you have a testcase that demonstrates the problem, and is fixed by these changes? Is this just refactoring, without changing behaviour? Finally, and very importantly, do you have a copyright assignment for changes to GCC? See https://gcc.gnu.org/contribute.html#legal