tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: in which we present an ugly hack to make sys/queue.h CIRCLEQ work

On Wed, Nov 20, 2013 at 07:01:15PM -0500, Ken Hornstein wrote:
 > #define TAILQ_PREV(elm, headname, field)                                \
 >         (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))

There's another wrinkle, however, which is that this code (TAILQ_PREV)
also violates the strict-aliasing rules. I don't think anyone has
found a clear case of gcc (4.8 or otherwise) tripping on it yet, but
it too really ought to be fixed before it bites someone.

David A. Holland

Home | Main Index | Thread Index | Old Index