From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129648 invoked by alias); 17 Sep 2018 19:50:32 -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 129615 invoked by uid 89); 17 Sep 2018 19:50:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail3-relais-sop.national.inria.fr Received: from mail3-relais-sop.national.inria.fr (HELO mail3-relais-sop.national.inria.fr) (192.134.164.104) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Sep 2018 19:50:30 +0000 Received: from ip-133.net-89-2-166.rev.numericable.fr (HELO stedding) ([89.2.166.133]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Sep 2018 21:50:26 +0200 Date: Mon, 17 Sep 2018 20:05:00 -0000 From: Marc Glisse To: Jonathan Wakely cc: Ville Voutilainen , libstdc++ , gcc-patches List Subject: Re: vector _M_start and 0 offset In-Reply-To: <20180917193648.GU23172@redhat.com> Message-ID: References: <20180917154554.GP23172@redhat.com> <20180917185023.GQ23172@redhat.com> <20180917191002.GR23172@redhat.com> <20180917193648.GU23172@redhat.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-SW-Source: 2018-09/txt/msg00909.txt.bz2 On Mon, 17 Sep 2018, Jonathan Wakely wrote: > On 17/09/18 21:24 +0200, Marc Glisse wrote: >> On Mon, 17 Sep 2018, Marc Glisse wrote: >> >>> On Mon, 17 Sep 2018, Jonathan Wakely wrote: >>> >>>>> Do other compilers besides gcc suppress the same way? >>>> >>>> No, clang doesn't: >>> >>> What version is that? I didn't test on this exact patch, but clang 6 and >>> 7 print, for similar code: >>> >>> warning: generalized initializer lists are a C++11 extension >>> [-Wc++11-extensions] >> >> Ah, with the exact code I do get an error indeed. I'll change the code :-( > > Thanks. I feel your pain, but I think we'd need a better reason to > break it (the valid C++98 code is uglier but not too painful). > > The cbegin() change can still use C++11 syntax. I think I'd rather keep the 3 lines identical, or make cbegin() call begin(). -- Marc Glisse