From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11146 invoked by alias); 11 Mar 2011 12:23:36 -0000 Received: (qmail 11134 invoked by uid 22791); 11 Mar 2011 12:23:34 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,TW_TM,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 11 Mar 2011 12:23:28 +0000 Received: (qmail 3673 invoked from network); 11 Mar 2011 12:23:26 -0000 Received: from unknown (HELO localhost) (froydnj@127.0.0.2) by mail.codesourcery.com with ESMTPA; 11 Mar 2011 12:23:26 -0000 Date: Fri, 11 Mar 2011 12:23:00 -0000 From: Nathan Froyd To: Jason Merrill Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH 14/18] move TS_STATEMENT_LIST to be a substructure of TS_TYPED Message-ID: <20110311122326.GF23686@codesourcery.com> References: <1299817406-16745-1-git-send-email-froydnj@codesourcery.com> <1299817406-16745-15-git-send-email-froydnj@codesourcery.com> <4D79BAC1.7080700@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D79BAC1.7080700@redhat.com> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-IsSubscribed: yes 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 X-SW-Source: 2011-03/txt/msg00585.txt.bz2 On Fri, Mar 11, 2011 at 01:01:37AM -0500, Jason Merrill wrote: > On 03/10/2011 11:23 PM, Nathan Froyd wrote: >> The new checks in add_stmt are >> required to make sure that cur_stmt_list can always point at something >> when calling append_to_statement_list_force. > > Why haven't we already pushed before we get to add_stmt? That's a good question. Possibly as a result of append_to_statement_list_1 helpfully noticing that if we pass in a pointer to NULL, it goes ahead and creates a list for us. This works nicely for the TREE_CHAIN-based stack, but not so nicely for the VEC-based stack. One wonders if the NULL checking in append_to_statement_list_1 could go away... -Nathan