On Tue, May 13, 2014 at 12:56:03PM +0200, Samuel Thibault wrote: > > > AIUI this cast is a case of type-puning. Why not making refcounts_t the > > > union itself? That way would be clearly safe with gcc's extension. > > > > As stated in the comment for refcounts_t, I like the idea of using the > > type system to enforce the use of the accessor functions. > > I understand, but type-puning will break with smart compilers. We do > have had bugs like that in the past.
I agree, you should directly use the proper type here, or maybe void * but I don't see the point. -- Richard Braun