From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57230 invoked by alias); 6 Jan 2019 04:59:14 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 57211 invoked by uid 89); 6 Jan 2019 04:59:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=H*u:Webmail, H*UA:Roundcube, H*u:Roundcube, H*u:1.3.6 X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 06 Jan 2019 04:59:10 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id x064x3xc007878 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 5 Jan 2019 23:59:08 -0500 Received: by simark.ca (Postfix, from userid 112) id 9ACB31E7AF; Sat, 5 Jan 2019 23:59:03 -0500 (EST) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id CC9981E4C2; Sat, 5 Jan 2019 23:59:02 -0500 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 06 Jan 2019 04:59:00 -0000 From: Simon Marchi To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 1/3] Use std::vector in type stacks In-Reply-To: <20190105204112.26849-2-tom@tromey.com> References: <20190105204112.26849-1-tom@tromey.com> <20190105204112.26849-2-tom@tromey.com> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00082.txt.bz2 On 2019-01-05 15:41, Tom Tromey wrote: } > @@ -1480,13 +1491,16 @@ parameter_typelist: > nonempty_typelist > : type > { > - VEC (type_ptr) *typelist = NULL; > - VEC_safe_push (type_ptr, typelist, $1); > + std::vector *typelist = > + new std::vector; The = should be on the next line. > @@ -3276,6 +3287,9 @@ c_parse (struct parser_state *par_state) > gdb_assert (par_state != NULL); > pstate = par_state; > > + c_parse_state cstate; > + scoped_restore cstate_resotre = make_scoped_restore (&cpstate, > &cstate); "resotre" Otherwise, LGTM. Simon