Jan Engelhardt <jengelh@xxxxxxxxxx> writes: > struct list_head { > struct list_head *next; > }; > struct item { > struct list_head list; > }; > > int main(void) > { > struct list_head hdr; > struct item itm, *pos; > > hdr.next = &itm.list; > itm.list.next = &hdr; > > for (pos = (struct item *)hdr.next; > pos != (struct item *)&hdr; > pos = (struct item *)(pos->list.next)) > ; > > return 0; > } I agree that I don't see an aliasing violation in this code. Ian