------- Comment #6 from rask at gcc dot gnu dot org 2007-09-11 21:25 ------- That code looks very similar to the doubly linked lists that AmigaOS exec.library uses. Just remove the XL and XLM prefixes from the names and it's the same. That code indeed plays nasty type casting tricks to reuse a NULL pointer in the list head, so as to save four bytes of memory. I guess aliasing violations were not a major concern when that code was written back in about 1985 or so. :-) Maybe the AROS project has revised code which survives alias analysis.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33374