From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17141 invoked by alias); 27 Jun 2011 14:37:56 -0000 Received: (qmail 17133 invoked by uid 22791); 27 Jun 2011 14:37:56 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 27 Jun 2011 14:37:42 +0000 Received: from kpbe11.cbf.corp.google.com (kpbe11.cbf.corp.google.com [172.25.105.75]) by smtp-out.google.com with ESMTP id p5REbdXA029907 for ; Mon, 27 Jun 2011 07:37:40 -0700 Received: from yie30 (yie30.prod.google.com [10.243.66.30]) by kpbe11.cbf.corp.google.com with ESMTP id p5REbccM015791 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Mon, 27 Jun 2011 07:37:38 -0700 Received: by yie30 with SMTP id 30so3330671yie.17 for ; Mon, 27 Jun 2011 07:37:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.252.18 with SMTP id z18mr6955878ybh.184.1309185457586; Mon, 27 Jun 2011 07:37:37 -0700 (PDT) Received: by 10.151.142.15 with HTTP; Mon, 27 Jun 2011 07:37:37 -0700 (PDT) In-Reply-To: <20110624231320.D05F61C0DAE@gchare.mtv.corp.google.com> References: <20110624231320.D05F61C0DAE@gchare.mtv.corp.google.com> Date: Mon, 27 Jun 2011 14:53:00 -0000 Message-ID: Subject: Re: [pph] Stream chain of struct fields (issue4631072) From: Diego Novillo To: Gabriel Charette Cc: reply@codereview.appspotmail.com, crowl@google.com, gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 X-System-Of-Record: true 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-06/txt/msg01995.txt.bz2 On Fri, Jun 24, 2011 at 19:13, Gabriel Charette wrote: > We were only streaming the first field of every struct. Struct fields have a chain link to the next field, thus we need to stream the DECL_CHAIN of every field as well recursively. > > I limited this to VAR_DECL and FUNCTION_DECL for now (which fixes all of our current bugs in regards to the struct fields issues), are there any other DECLs that can potentially be fields of a struct? FIELD_DECLs are the natural members of structs. But those are handled by generic streaming. Also needed for PARM_DECLs (already handled as well). VAR_DECLs and FUNCTION_DECLs were the only ones missing. > Syntax-wise: Is it ok to play this 'case' fall through trick with VAR_DECL or should I make a > separate case entry with it's own break? Cleaner to just distinguish them inside the main group. I've tweaked it and committed to the branch. We are still missing some link attributes. The code compiles but does not link. I will look into that today. Diego.