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 Saturday, at 14:20, Matthew Orgass wrote:
| 2013-11-22 anthony.mallet%laas.fr@localhost wrote:
| > Yes, (char *)ptr is an explicitly allowed exception.
| 
|    In gcq.h, I used (uint8_t *) instead of (char *) with offsetof and I see 
| endian.h uses unit8_t to rearrange bytes.  It makes more sense that way 
| IMO, but it sounds like it actually violates strict aliasing while using 
| char wouldn't.  Does anyone with more in depth understanding know if this 
| is this case?

This may help, although it is still a bit obscure to me:
http://stackoverflow.com/questions/12666146/can-uint8-t-be-a-non-character-type

In practice, is there any real chance that uint8_t is not typedef'ed to a char
on NetBSD?


Home | Main Index | Thread Index | Old Index