On 19 Nov, 2014, at 01:54 , Taylor R Campbell 
<campbell+netbsd-tech-k...@mumble.net> wrote:

>   Date: Wed, 19 Nov 2014 00:05:05 +0800
>   From: Dennis Ferguson <dennis.c.fergu...@gmail.com>
> 
>   Also, the TAILQ macros depend on a type pun fairly similar to the one
>   that did in the CIRCLEQ macros and hence have a lifetime which extends
>   only to some future version of the compiler smart enough to recognize
>   that and miscompile them.
> 
> What type pun is that?  I don't see it.

I think this one:

#define TAILQ_LAST(head, headname) \
        (*(((struct headname *)((head)->tqh_last))->tqh_last))
#define TAILQ_PREV(elm, headname, field) \
        (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))

The (struct headname *) pointer it is obtaining by the cast is
sometimes being used to access data in something other than
a 'struct headname'.

Dennis Ferguson

Reply via email to