From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24858 invoked from network); 7 Mar 2006 20:48:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 7 Mar 2006 20:48:24 -0000 Received: (qmail 91302 invoked from network); 7 Mar 2006 20:48:18 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 7 Mar 2006 20:48:18 -0000 Received: (qmail 8160 invoked by alias); 7 Mar 2006 20:48:15 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22332 Received: (qmail 8150 invoked from network); 7 Mar 2006 20:48:15 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 7 Mar 2006 20:48:15 -0000 Received: (qmail 90971 invoked from network); 7 Mar 2006 20:48:14 -0000 Received: from mta09-winn.ispmail.ntl.com (81.103.221.49) by a.mx.sunsite.dk with SMTP; 7 Mar 2006 20:48:13 -0000 Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mta09-winn.ispmail.ntl.com with ESMTP id <20060307204811.BLXP23947.mta09-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com> for ; Tue, 7 Mar 2006 20:48:11 +0000 Received: from pwslaptop.csr.com ([81.105.236.124]) by aamtaout02-winn.ispmail.ntl.com with ESMTP id <20060307204811.ZGJJ1347.aamtaout02-winn.ispmail.ntl.com@pwslaptop.csr.com> for ; Tue, 7 Mar 2006 20:48:11 +0000 Received: from pwslaptop.csr.com (pwslaptop.csr.com [127.0.0.1]) by pwslaptop.csr.com (8.13.4/8.13.4) with ESMTP id k27KldKR006273 for ; Tue, 7 Mar 2006 20:47:39 GMT Received: from pwslaptop.csr.com (pws@localhost) by pwslaptop.csr.com (8.13.4/8.13.4/Submit) with ESMTP id k27KldFY006270 for ; Tue, 7 Mar 2006 20:47:39 GMT Message-Id: <200603072047.k27KldFY006270@pwslaptop.csr.com> X-Authentication-Warning: pwslaptop.csr.com: pws owned process doing -bs From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: "type punned" warnings In-Reply-To: Your message of "Tue, 07 Mar 2006 11:48:47 PST." <20060307194847.GC28589@dot.blorf.net> Date: Tue, 07 Mar 2006 20:47:39 +0000 Wayne Davison wrote: > I fixed the first class of warnings by putting a "struct hashnode node;" > at the start of every structure that was getting cast to HashNode. > > I fixed the second class of warnings by making a LinkList a union of a > "struct linklist list;" and a "struct linknode node;". That's much better. (Actually, I have something similar in some data handling code I'm responsible for, and I keep gnashing my teeth I can't make the base class a real base class, but this is fine.) > I also think that it would be nice to rename the "last" variable in the > LinkNode structure to be "prev", which is a clearer name to me. Yes, that confused me for a long time. You could also check in the patch to add flags to nodes on the way through paramsubst(), which finally starts making multsub() look less of a disaster. -- Peter Stephenson Web page still at http://www.pwstephenson.fsnet.co.uk/