This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Aliasing problems in GNU Chill?
- To: David Starner <dvdeug@x8b4e53cd.dhcp.okstate.edu>
- Subject: Re: Aliasing problems in GNU Chill?
- From: Jeffrey A Law <law@cygnus.com>
- Date: Thu, 02 Sep 1999 17:39:27 -0600
- cc: gcc@gcc.gnu.org
- Reply-To: law@cygnus.com
In message <19990902102549.A3136@x8b4e53cd.dhcp.okstate.edu>you write:
> On Thu, Sep 02, 1999 at 12:43:26AM -0600, Jeffrey A Law wrote:
> > In message <19990901144104.A6143@x8b4e53cd.dhcp.okstate.edu>you write:
> > > I was reading through andps.c in libchill recently and came across th
> is.
> > >
> > > else if (bitlength <= SET_SHORT_SIZE)
> > > {
> > > *((SET_SHORT *)out) = *((SET_SHORT *)left) &
> > > *((SET_SHORT *)right);
> > > MASK_UNUSED_SHORT_BITS((SET_SHORT *)out, bitlength);
> > > }
> > >
> > > It appears to me that this suffers from the same aliasing problems th
> at
> > > we've been hearing about recently. No?
> > Yes.
> No. SET_SHORT & friends are unsigned char when USE_CHARS is set, and
> it's unconditionally set. Hence the exception for char* pointers comes
> into play (I believe.)
Ah. OK. I'll update powerset.h to prevent people from disabling USE_CHARS :-)
jeff
>
> It could use some changes (the above block is dead code with USE_CHARS defi
> ned),
> but it appears to be correct.
>
>