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 Thursday, at 23:56, Mouse wrote:
| Yes, or at least wrong by that metric.  (The other 10% are things like
| casting to char * and copying as a sequence of bytes, which I think is
| exempted, though I don't recall details.

Yes, (char *)ptr is an explicitly allowed exception.

C99:
``An object shall have its stored value accessed only by an lvalue expression
that has one of the following types:

 - a type compatible with the effective type of the object,
 - a qualified version of a type compatible with the effective type of the 
object,
 - a type that is the signed or unsigned type corresponding to the effective
   type of the object,
 - a type that is the signed or unsigned type corresponding to a qualified
   version of the effective type of the object,
 - an aggregate or union type that includes one of the aforementioned types
   among its members (including, recursively, a member of a subaggregate or
   contained union), or
 - a character type. ''


Home | Main Index | Thread Index | Old Index