tech-kern 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

>while preparing to update to GCC 4.8 i discovered that our sys/queue.h
>CIRCLEQ macros violate C aliasing rules, ultimately leading to the
>compiler eliding comparisons it declared as always false.

I see that at least on MacOS X, sys/queue.h contains the following note:

 * Note that circle queues are deprecated, because, as the removal log
 * in FreeBSD states, "CIRCLEQs are a disgrace to everything Knuth taught
 * us in Volume 1 Chapter 2. [...] Use TAILQ instead, it provides the same
 * functionality." Code using them will continue to compile, but they
 * are no longer documented on the man page.

I don't think I'm knowledgable enough to speak to the accuracy of that
comment, but would it be simpler just to migrate all of the code over to
TAILQ if the CIRCLEQ ABI is broken as designed?


Home | Main Index | Thread Index | Old Index