bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 03/11] include: add lock-less reference counting primitives


From: Richard Braun
Subject: Re: [PATCH 03/11] include: add lock-less reference counting primitives
Date: Tue, 13 May 2014 14:01:59 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]