Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: "type punned" warnings
- X-seq: zsh-workers 22332
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: "type punned" warnings
- Date: Tue, 07 Mar 2006 20:47:39 +0000
- In-reply-to: Your message of "Tue, 07 Mar 2006 11:48:47 PST." <20060307194847.GC28589@xxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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 <p.w.stephenson@xxxxxxxxxxxx>
Web page still at http://www.pwstephenson.fsnet.co.uk/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author